Method deprecated or moved
This method is deprecated or moved on the latest stable version.
The last existing version (v6.0.0) is shown here.
These similar methods exist in v7.1.3.2:
concerns(*args)
public
Use the named concerns
resources :posts do
concerns :commentable
end
Concerns also
work in any routes helper that you want to use:
namespace :posts do
concerns :commentable
end
Show source
def concerns(*args)
options = args.extract_options!
args.flatten.each do |name|
if concern = @concerns[name]
concern.call(self, options)
else
raise ArgumentError, "No concern named #{name} was found!"
end
end
end