Class Ardes::ResourcesController::SingletonResourceService
In: lib/ardes/resources_controller.rb
Parent: ResourceService

Methods

find   new   service  

Public Instance methods

[Source]

     # File lib/ardes/resources_controller.rb, line 832
832:       def find(*args)
833:         if resource_specification.find
834:           resource_specification.find_custom(controller)
835:         elsif controller.enclosing_resources.size > 0
836:           enclosing_resource.send(resource_specification.source)
837:         else
838:           ResourcesController.raise_cant_find_singleton(controller.resource_name, controller.resource_class)
839:         end
840:       end

build association on the enclosing resource if there is one

[Source]

     # File lib/ardes/resources_controller.rb, line 843
843:       def new(*args)
844:         enclosing_resource ? enclosing_resource.send("build_#{resource_specification.source}", *args) : super
845:       end

[Source]

     # File lib/ardes/resources_controller.rb, line 847
847:       def service
848:         resource_class
849:       end

[Validate]