Module: CanCan::ControllerResourceLoader
- Includes:
- ControllerResourceBuilder, ControllerResourceFinder, ControllerResourceNameFinder, ControllerResourceSanitizer
- Included in:
- ControllerResource
- Defined in:
- lib/cancan/controller_resource_loader.rb
Instance Method Summary collapse
Instance Method Details
#load_resource ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/cancan/controller_resource_loader.rb', line 14 def load_resource return if skip?(:load) if load_instance? self.resource_instance ||= load_resource_instance elsif load_collection? self.collection_instance ||= load_collection end end |