title: Ruby On Rails - Using concerns in controllers
body: <p><strong>Possible Noob Warning:</strong> <em>New to RoR</em>  </p>
  
  <p>I am trying to use concerns in RoR. Right now I just have a very simple concern writen</p>
  
  <pre><code>#./app/controllers/concerns/foo.rb
  module Foo
    extend ActiveSupport::Concern
  
    def somethingfoo
      puts "Ayyyy! Foo"
    end
  end
  </code></pre>
  
  <p>When I try and use this concern in my controller I get a undefined method error</p>
  
  <pre><code>#./app/controllers/foo_controller.rb
  class FooController &lt; ApplicationController
  
    include Foo
  
    def show
      Foo.somethingfoo # undefined method 'somethingfoo' for Foo:Module
      render plain: "Ohh no, It doesnt even show me because of the error above me"
    end
  end
  </code></pre>
  
  <p>To my knowledge <code>somethingfoo</code> should be called but it is not. I have also tried defining <code>somethingfoo</code> in a <code>included do ... end</code> block in the concern but this does not work either.<br>
  <br>
  <br>
  Is there something I am missing? Can concerns not be used like this with controllers?</p>