Ruby On Rails - Using concerns in controllers
问题 Possible Noob Warning: New to RoR I am trying to use concerns in RoR. Right now I just have a very simple concern writen #./app/controllers/concerns/foo.rb module Foo extend ActiveSupport::Concern def somethingfoo puts "Ayyyy! Foo" end end When I try and use this concern in my controller I get a undefined method error #./app/controllers/foo_controller.rb class FooController < ApplicationController include Foo def show Foo.somethingfoo # undefined method 'somethingfoo' for Foo:Module render