Method: ResourcesController#map_enclosing_resource
- Defined in:
- lib/resources_controller.rb
permalink #map_enclosing_resource(name, options = {}, &block) ⇒ Object
Creates a resource specification mapping. Use this to specify how to find an enclosing resource that does not obey usual rails conventions. Most commonly this would be a singleton resource.
See Specification#new for details of how to call this
489 490 491 492 |
# File 'lib/resources_controller.rb', line 489 def map_enclosing_resource(name, = {}, &block) spec = Specification.new(name, , &block) self.resource_specification_map = resource_specification_map.merge spec.segment => spec end |