Module: Hammock::ResourceMappingHooks::Methods

Defined in:
lib/hammock/resource_mapping_hooks.rb

Instance Method Summary collapse

Instance Method Details

#map_resource_with_hammock_route_map(entity, options = {}, &block) ⇒ Object



16
17
18
19
# File 'lib/hammock/resource_mapping_hooks.rb', line 16

def map_resource_with_hammock_route_map entity, options = {}, &block
  ActionController::Routing::Routes.route_map.add entity, options
  map_resource_without_hammock_route_map entity, options, &block
end

#map_singleton_resource_with_hammock_route_map(entity, options = {}, &block) ⇒ Object



21
22
23
24
# File 'lib/hammock/resource_mapping_hooks.rb', line 21

def map_singleton_resource_with_hammock_route_map entity, options = {}, &block
  ActionController::Routing::Routes.route_map.add_singleton entity, options
  map_singleton_resource_without_hammock_route_map entity, options, &block
end