Using Rails Edge-style resource actions now
June 5th, 2007
I've just been working on a site that may have users sharing resourceful URLs and I want to use the new-style action routing from edge rails:
# old style
/people/1;edit
# new style
/people/1/edit
I've knocked up a quick file that can be dropped into /lib and required in environment.rb: fix_resource_routing.rb.
It just overrides the 1.2 methods with those specified in this patch.
5 Responses to “Using Rails Edge-style resource actions now”
Sorry, comments are closed for this article.

June 5th, 2007 at 04:39 PM
Thanks, the semicolon thing always really bugged me.
June 5th, 2007 at 04:39 PM
BOOOYAHHHHH! thx d00d.
June 5th, 2007 at 06:24 PM
Just to let you know, the latest version of edge uses forward slashes instead of semicolons.
June 5th, 2007 at 06:30 PM
Alex: This fix is for that very reason - apps running on stable can use the edge-style forward slashes. This means that their permalinks wont break when this style goes stable.
June 5th, 2007 at 06:40 PM
whoops, wasn't thinking, sorry ;)