Module: ResourceAsRoot::ResourcesHacks

Defined in:
lib/ventouse/resource_as_root.rb

Instance Method Summary collapse

Instance Method Details

#map_resource(entities, options = {}, *args) ⇒ Object



19
20
21
22
# File 'lib/ventouse/resource_as_root.rb', line 19

def map_resource entities, options = {}, *args
  options[:as] = '' if options[:as] == :root
  super
end

#map_resource_routes(map, resource, action, route_path, *args) ⇒ Object



14
15
16
17
# File 'lib/ventouse/resource_as_root.rb', line 14

def map_resource_routes map, resource, action, route_path, *args
  route_path.gsub!(/\/\//, '/')
  super
end