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



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

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



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

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