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”

  1. Alex Peattie Says:

    Thanks, the semicolon thing always really bugged me.

  2. Tony Yayo Says:

    BOOOYAHHHHH! thx d00d.

  3. Alex MacCaw Says:

    Just to let you know, the latest version of edge uses forward slashes instead of semicolons.

  4. Stephen Bartholomew Says:

    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.

  5. Alex MacCaw Says:

    whoops, wasn't thinking, sorry ;)

Sorry, comments are closed for this article.