Module: ControllerResources::Extension::ClassMethods

Defined in:
lib/controller_resources/extension.rb

Instance Method Summary collapse

Instance Method Details

#resource(name = self.name.gsub(/Controller/, '').tableize, &block) ⇒ Object

Initialize this controller as an authenticated resource.


40
41
42
43
44
# File 'lib/controller_resources/extension.rb', line 40

def resource(name = self.name.gsub(/Controller/, '').tableize, &block)
  self._resource = Resource.extend! controller, name do
    yield
  end
end