This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
benjami (author)
Tue May 29 13:50:50 -0700 2007
| name | age | message | |
|---|---|---|---|
| |
MIT-LICENSE | Tue May 29 13:50:50 -0700 2007 | [benjami] |
| |
README | Tue May 29 13:50:50 -0700 2007 | [benjami] |
| |
init.rb | Tue May 29 13:50:50 -0700 2007 | [benjami] |
| |
lib/ | Tue May 29 13:50:50 -0700 2007 | [benjami] |
| |
test/ | Tue May 29 13:50:50 -0700 2007 | [benjami] |
README
MagicRouting ============ MagicRouting allows for the creation of more meaningful URLs than you get out-of-the-box with Rails. Even when you override to_param for an ActiveRecord model, you still get ID-junk that doesn't make sense to end users (e.g., person/123-foo-smith). With this plugin, any path segment in a route that corresponds to an attribute on an ActiveRecord model object will be automatically retrieved from that object for the generated URL. Notice that this makes changing your URL scheme very easy - all you have to do is update the identifying segments of the route, and your application is using, e.g., usernames instead of IDs, or vice versa. Example ======= Route: map.username 'person/:username', :controller => 'people', :action => 'show' map.id 'person/:id', :controller => 'people', :action => 'show' Use: <%= url_for username_url(@person) %> => 'person/foo' <%= url_for id_url(@person) %> => 'person/123' Copyright (c) 2007 Ben Scofield, released under the MIT license




