Redirecting Users’ URLs
Code: , ,
Comments Off on Redirecting Users’ URLs

I got an email in response to an old post on how I designed NearbyGamer‘s discussion URLs. It asked how to create readable URLs for a community site where users might edit those URLs. What happens after users have made lots and lots of edits?

Continue this post

Rails URL Params as Types
Code: , , ,
Comments Off on Rails URL Params as Types

Yesterday I (belatedly) took my friend Nola Stowe‘s advice and picked up a book she tech-reviewed, The Rails Way by Obie Fernandez. It’s been a great read so far (about 85 pages in), and I just realized that routing is largely about type conversion.

Continue this post

Discussion URLs: Opaque, Usable, and Readable
Code: , , , , , , , , , ,
Comments Off on Discussion URLs: Opaque, Usable, and Readable

I just wrote about Human-Readable ActiveResource URLs, and now I want to examine one example of them more in-depth. Discussion forum URLs have several conflicting goals:

Continue this post

Human-Readable ActiveResource URLs
Code: , , , , , , , , , ,
Comments Off on Human-Readable ActiveResource URLs

I’ve got URLs on the brain this week. I started NearbyGamers using Rails 1.1 with just gamers and tags. I upgraded to Rails 1.2 (and liked it)
, and added discussions after I updated to Rails 1.2. I was able to use ActiveResource for Discussions with Posts as a nested resource. I’m really happy with this code, as it’s very tidy.

Continue this post

Rails: Semicolons Out, Slashes In
Code: , , , , , , , , ,
Comments Off on 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).

Continue this post