Module: ResourceAsRoot::ResourcesHacks
- Defined in:
- lib/ventouse/resource_as_root.rb
Instance Method Summary collapse
- #map_resource(entities, options = {}, *args) ⇒ Object
- #map_resource_routes(map, resource, action, route_path, *args) ⇒ Object
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, = {}, *args [:as] = '' if [: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 |