Rails Routing Beta

Published 15 February 05 by Justin French, 2 comments

Sure, it’s only in Beta right now, but from what I can tell, it looks like one highly refined, polished, slick, endlessly customizable solution to clean URLs.

The current default rewrite rules for Rails total six lines (three for the /controller/action/id version, and three for the module/controller/action/id version). Add in a couple of custom URL schemes (all of which require about three long rewrite lines each), and it’s a huge mess.

Looking at the small examples given, it would appear that for every two or three mod_rewrite lines in a .htaccess file, Routing can solve it in just one easy-to-read line.

And we’re not stuck with the standard module, controller, view and id here – we can assign pretty much anything we like. I’m sitting here with a huge grin on my face as I think about the seemingly endless possibilities.

Better still, since all the new rules are in the application code (not in the public HTML folder), this will make it much easier for programmers to distribute updates to Rails applications.

I’ll have to wait for further documentation and examples, but this is really exciting stuff.

Update: The documentation has also been made available as a “work in progress” – to repeat myself, this looks fantastic.

Options

What is this?

portrait of Justin

This is the online home of Justin French, a designer & web application developer located in Melbourne, Australia. I like finding ways to make things work better. I like clarifying and simplifying. I like to understand how you understand things.

» read more

Subscribe to my feed

Follow me on Twitter

@justinfrench

More Notebook Articles

Show more notebook articles

Search