if I do map.resources :users in routes.rb, the routes I get have (.:format) at the end of each route (rake routes).
How do I get rid of this in rails 2.3?
I’m pretty sure in 3.1.1 I can do something like :format=>false. Is this available in 2.3? Is there a monkey patch I can do to mimic :format=>false?
Thanks.
Monkey patched. Blah. I really, really wanted to change the default behavior, but took into consideration potential future developers’ sensitivities.
map.resource(s) ..., :format=>falsenow doesn’t include the format in the routeconfig/initializers/resources.rb:
The change I made is here:
It used to just be
formatted_route_path = "#{route_path}.:format"To get it to apply to all routes, in routes.rb, I just wrapped all routes with
map.with_options :format=>false do |map| ... end