Rails: Semicolons Out, Slashes In
As of r6485, Edge Rails resource routes use / as the URL separator for actions instead of ;. This will be in Rails 2.0 (and I like / more), so I wanted to get prepared for the change by updating my URLs now. I didn’t want to move to Edge Rails (too exciting for me), so I grabbed the change, dropped it into a source file, and loaded it into my app (thank you, open classes).
If you want to get ready now, grab slash_urls.rb and drop it in your lib directory. At the top of your config/routes.rb, add the line:
require 'slash_urls'
And now all my URLs on NearbyGamers use slashes instead of semicolons. I only had one or two actions on my ActiveResource routes besides the built-in CRUD, so I’m not worried about doing a 301 redirects.
Want more? I'm not as good at forgetting to update @pushcx on Twitter.
Conversation (1)
Jump to comment form | comments rss [?]Add this link to your feed reader to watch for new replies to this post. | trackback uri [?]Trackback this link in a blog post to create a comment here linking to your post.