Aliasing resources in Ruby on Rails
73 comments Latest by pump shoes Tue, 31 Aug 2010 03:06:33 GMT
Earlier today, a friend working on a project asked me how we approached routes on our website. If you take a quick peak at our website, you’ll see that we have URLs like so:
- http://planetargon.com/
- http://planetargon.com/who-we-are
- http://planetargon.com/who-we-are/robby-russell
I couldn’t remember where I came across this before and wasn’t quickly finding it in the Ruby on Rails API, so decided that I’d do a quick write up on it.
When we launched our new site a few months ago, we were working off an existing code base. We have a model named, TeamMember and a corresponding controller. When we decided to come up with new conventions for our URL structure, we opted to ditch the normal Rails conventions and go our own route. What we weren’t sure about was how to alias resources in our routes nicely. After some digging around, we came across the :as option.
So, our route was:
map.resources :team_membersWhich provided us with:
- /team_members
- /team_members/robby-russell
We simply added :as => 'who-we-are' to our route:
map.resources :team_members, :as => 'who-we-are'...and we got exactly what we were looking for in our URLs.
* /who-we-are
* /who-we-are/gary-blessington
If you look at our site, you’ll notice that we did this in a few areas of our application so that we could define our own URL structure that was more friendly for visitors and search engines.
Anyhow, just a quick tip for those who want to change up their URLs with Ruby on Rails.
p.s., if you know where I can find this documented, let me know so that I can provide a URL in this post for others. :-)
Enjoying the content? Be sure to subscribe to my RSS feed.






Here are the docs
It’s documented over here in the part ‘options to customize the resulting routes’. ;)
. Unfortunately, wholesale ugg boots discoloration, or caused by another product protection vacuum Shoes UGG Australia in May, one year warranty. discount ugg boots The first step in maintenance is a wire brushUggs, suede or nubuck brush in one direction. If done regularly, this will prevent dirt or dust to settle from the fiber suede and reduce potential damage caused by debris in the air. But sooner or later, discount ugg cardy boots Uggs need cleaning or in certain areas or in general. Eraser quality stain can be used to reduce the stains before cleaning.
Thank you this article I hope you have an enjoyable day. gucci shoes gucci handbags gucci handbags gucci belts
Thank you this article I hope you have an enjoyable day. chi flat iron chi hair straightener chi flat irons chi hair tools
nike shox ghd hair straightener china wholesale
glad to see this article
I enjoy it,thanks. ed hardy jeans
ed hardy t shirt
ed hardy shirt
wholesale ed hardy
ed hardy boots
Again, estimates suggest that the numbers in both ICM and Com Res would make Labour the largest party but leave it short of an overall majority. Labour finds itself in the unusual position of falling to third place in three out of the last four polls but celebrating its potential return to government.
The leaders debates have nfl jerseys changed the shape of British election campaigns, as those who warned the Tory soccer jerseys leader against demanding them said they would. First, there are the practicalities. Three days of any NBA jerseys campaign week are dominated by preparing,World Cup Jerseys debating, post-match spinning and then learning the lessons for the next encounter. On top of that the three NHL jerseys leaders have punishing schedules, criss-crossing the country.
great
great post, good luck.
http://www.gucci-shoes-bags.com http://www.guccinewshop.com Dear friends welcome to our store: we have a specail offer now which is once you buy any product you can get a free gift as well, these gifts are in the gift area, you can free to choose and please add to the shopping cart, we will send it together with your purchased product. Thanks!
What we weren’t sure about was how to alias resources in our routes nicely. After some digging around, we came across the :as option.
What we weren’t sure about was how to alias resources in our routes nicely. After some digging around, we came across the :as option.
Anyhow, just a quick tip for those who want to change up their URLs with Ruby on Rails.
Anyhow, just a quick tip for those who want to change up their URLs with Ruby on Rails.
Ruby on Rails is an open source where u can find the links u need.
handbag
Ruby on Rails is an open source where u can find the links u need.
Ruby on Rails is an open source for your needs, http://www.replica-handbags-shop.com
The Supra Strapped NS shoes are one of the top skateboarding shoes on the block.
It is a good chance for you to buy now .Nowadays ,we published a new kind of Air Jordan ,that is the Air Jordan Force line .They are so good that when you see it , you will like it and are willing to own one .Beds
Jewish Directory Hot Fix Motif Catering Service Home Gift Coat Dress Bar Food Replica Armor Gold Jewelry Cafe Well Bug Dream World bar supplies shop very nice.
I like this web,thanks.
Christian louboutin sandals
Christian louboutin wedges
Christian louboutin wholesale
We mainly supply top mirror quality brand name products, such as handbag,shoes,watch,jewelry,guitar,belt,jacket,jeans,scarf and so on
accept paypal and credit card.
If you interesting please contact us
web: www.lucky2006.com M-ail: lucky2006shop(AT)gmail Com
Now let us see whether Mbt shoes clearance is an effective treatment of cellular organization.The science behind mbt shuguli gtx shoes is very simple. www.mbtsonsale.com www.mbtsonsale.com www.mbtsonsale.com
Now let us see whether www.mbtsonsale.com Mbt shoes clearance is an effective treatment of cellular organization.The science behind mbt shuguli gtx shoes is very simple.www.mbtsonsale.com
we decided to come up with new conventions for our URL structure, we opted to ditch the normal Rails conventions and go our own route.
Working on the give topic is really a difficult task but your this tutorial made it easy for me to handle it without any problem. If anyone seeking information then this blog is the best place for him as it has quality content for your required information. Thanks for sharing.
replica handbags knowoff handbags replica designer handbags replica handbags wholesale replica watches replica Hermes handbags replica louis vuitton handbags replica Balenciaga handbags replica handbags replica Valentino handbags replica Chanel handbags replica Christian Dior handbags replica Gucci handbags replica Miu Miu handbags replica Prada handbags replica Fendi handbags replica Thomas Wylde handbags replica Mulberry handbags replica Bottega Veneta handbags replica Yues Saint Laurent handbags replica D&G handbags replica Jimmy Choo handbags replica Marc Jacobs handbags replica Givenchy handbags replica Celine handbags replica Versace handbags Coach replica handbags Chloe replica handbags replica Loewe handbags replica Goyard handbags
replica handbags knowoff handbags replica designer handbags replica handbags wholesale replica watches replica Hermes handbags replica louis vuitton handbags replica Balenciaga handbags replica handbags replica Valentino handbags replica Chanel handbags replica Christian Dior handbags replica Gucci handbags replica Miu Miu handbags replica Prada handbags replica Fendi handbags replica Thomas Wylde handbags replica Mulberry handbags replica Bottega Veneta handbags replica Yues Saint Laurent handbags replica D&G handbags replica Jimmy Choo handbags replica Marc Jacobs handbags replica Givenchy handbags replica Celine handbags replica Versace handbags Coach replicas Chloe replica handbags replica Loewe handbags replica Goyard handbags
After i read the post here i to realize that fake watches is good to wear. http://www.superwatches.net/
hi guys, want a high quality life ? yes! you must link the following some usefulthing: http://www.golfclubs365.com http://www.golfequipment18.com there are two Golf Clubs stores,include kinds of golf equipment, wholesale golf clubs.
Thank you for appreciating
The post was interesting…
I havent any word to appreciate this post…..Really i am impressed from this post….the person who create this post it was a great human..thanks for shared this with us.
Thanks for the code Robby
ty
thanks for your post i was looking for something like this. Ill be subscribing to your RSS feed.
thank you for your sharing.http://www.handbags-club.com/
thank you very much for your kind sharing and i will back soon replica handbags
http://www.louisvuitton4love.com/spring-summer-2010-c-2.html
http://www.louisvuitton4love.com/damier-azur-canvas-c-13.html
Thanks …........................
In burghal life, Chanel handbags are actual important accessories for women. There are beyond rucksacks and tote Chanel bags and abate purse like accoutrements absolute for a night out. Chanel bag is acceptable for every occasion, and it is harder to acquisition annihilation that Chanel does not include.
Hardy clothing brings archetypal art of boom into the vintage-inspired accepted elements in hardy shirt design. So it is not harder to accept that why a hardy shirts with simple band is a barbecue for the eyes. Therefore, there is abundant acumen for you to accept that you will accept a acceptable time in this summer if you accept hardy shirt .
Demonstrate a unique new conceptjordan shoesAw21
As a global brand
shape ups gucci shoes sale mbt shoes sales ugg boots shape ups skechers christian louboutin handbags on sale air max 90good job. carry on…
Thank you American News for your sharing this article. I hope you have an enjoyable day with European News to get more information about Football Clubs – Used stationary bikes or about Latest Mobile Phone
Regards, Bollywood Stars
buty jimmy choo jimmy choo skor jimmy choo booties shopping jimmy choo my jimmy choos
god is girl
guys, i am a movie lover, there are some hot DVD movies i really like and want to share to you—-
Entourage DVD 1-6 http://www.stardvdcity.com/entourage-seasons-16-dvd-boxset-p-420.html Entourage DVD set http://www.stardvdcity.com/entourage-seasons-16-dvd-boxset-p-386.html Queer as folk DVD set http://www.stardvdcity.com/queer-as-folk-seasons-15-dvd-boxset-p-329.html Queer as folk DVD 1-5 http://www.stardvdcity.com/queer-as-folk-seasons-15-dvd-boxset-p-330.html Boston legal DVD 1-5 http://www.stardvdcity.com/boston-legal-seasons-15-dvd-boxset-p-231.html Boston legal DVD set http://www.stardvdcity.com/boston-legal-seasons-15-dvd-boxset-p-233.html Boston legal DVD boxset http://www.stardvdcity.com/boston-legal-seasons-15-dvd-boxset-p-232.html i believe you will love them! it really has amazing plot , wonderful screen, and also nice musics. we can’t miss them!!!
Top Quality Replica Watches Luxury watch is a high false,Royal Oak Offshore
Replica Baume & Mercier Riviera Watches
true high-level watches to buyers never leave any regrets,Bell & Ross Watches Accessories
BR 01 – Instrument 46mm
from the exterior to the movement of people everywhere to work are moving fine. Although it is advanced counterfeit goods, but worth Have.BR 02 – Instrument 44mm
BR 03 – Instrument 42mm
Upper-class elite are the most popular senior jewelry watches The precise timing process and challenges of self-warrior temperament and fast cars and sports spirit Coincidentally,Replica Swiss Chronomat Watch
Evolution
the two complement each other, to its “extraordinary creativity,Replica Swiss Montbrillant Watch
Replica Swiss Navitimer Watch
Replica Swiss Superocean Watch
from the traditional” spirit of play to the extreme brand.
Top male fashion must-watch In order to better provide you with satisfactory products and services, Replica IWC Watches
IWC Special Edition Aquatimer Chronograph Cousteau Divers Replica
they are top of the watch Watch brand in the area, the most attractive than material and design.BlackBird Replica Watch
For men, from the “watch” the details disclosed by the taste and feel gorgeous,Bentley Swiss replica
Avenger Swiss replica
is just right for the most stylish, offbeat reflection. This man should have a luxury brand watch.
Return to the classic top-watch Seems natural is elegant watches, fashion, noble synonymous with cell phones,50 Fathoms Watches
Breguet Classique Tourbillon Watches
computers have become a daily necessity, but wearing a watch of their own, Replica Breguet Type XX Watches
has become a living, a taste, a romantic, a symbol. Love life, love yourself, from now on,Audemars Piguet Jules Audemars Watches
Audemars Piguet Royal Oak Watches
from the watch started!
birkin bag birkin bags, Fendi Spy, Kooba Handbags, Hermes Kelly, Marni Handbags ,
why mbt is better than other shoes, whereas the pirce is good with MBT Habari? that is mbt shoes usa good advantage.
Again, the estimates logo design suggest that the figures in both ICM and Com Res largest party would work, but it leaves the majority. Labour is in the unusual situation of falling to third place in three of the four most recent polls, but the logo designs celebration of its return potential for the government.
ed, TeamMember and a corresponding controller. When we decided to come up with new conventions for our URL structure, we opted to ditch the normal Rails conventions and g
ed, TeamMember and a corresponding controller. When we decided to come up with new conventions for our URL structure, we opted to ditch the normal Rails conventions and g
iphone deals iphone for sale 3g iphone for sale iphone on sale apple iphone for sale iphone hot
wifi-via-mw8505-600mhz”>8” touch screen tft lcd google android 1.6 tablet pc
i9 sciphone i9 wifi i9 ciphone i9 i9 phone i9 3g i9 cell phone i9 touch
summer is comming and wear mbt is good choice,especially MBT Tembea shoes and mbt sandals,just enjoy this summer.
Christian Louboutin experimental art and design styles in shoe manufacturing is a maverick. Embellishment on the shoes of those well-designed small-pattern often gives people a great surprise, such as a bright red sweetheart, a pink feathers, delicate and charming flower buds. Charmingly, Christian Louboutin Pumps enjoy great part of the market place and huge popularity among consumers. Find discount Christian Louboutin at Christian Louboutin.
Miami flightsI
One accessory that many pandora beads women consider a necessity is a handbag. In fact there is such a demand for pandora bracelet ladies handbags in the marketplace that the selection just constantly increases. As each new season begins there are pandora bracelets uk dozens of new designs of ladies handbags available. pandora charm bracelet Every woman has her own sense of style and therefore she’ll tend to purchase ladies pandora charms handbags that reflect that. For some women they only buy designer ladies handbags. pandora charms bracelets These particular types of ladies handbags are crafted from the finest materials and pandora jewellery carry the names of some of the most celebrated designers in the world. Designer pandora jewelry ladies handbags are very expensive but many women view them as a fashion pandora uk investment.
Find a Great Womens Tuxedo Women’s neck scarves don’t have to remain as an accessory for just the neck. Abercrombie Hats Use smaller designer scarves to decorate the handles of an evening bag. ed hardy Hats You can wrap the scarf at the hip and tie it with one side pointing down in a triangle to create an entirely different look. ed hardy Caps Create an off the shoulder look with your scarf by wrapping it in a wide loop. ed hardy Hats Use it as a background to display a piece of jewelry.Scarves are affordable, buy ed hardy take up little room and are available in a style or color to suit almost any taste and budget. Is it any wonder that they are becoming so popular once again? A drawer full of brightly colored scarves can enliven and embolden your wardrobe; people will think you have money to burn.
How is ruby on rails? Whats the language like?
Wow what a great blog this is! Some quality articles I don’t see every day!
000-130 practice exam 000-134 study guide 000-135 Exam questions 000-136 Test questions 000-136 braindump torrent 000-139 dumps
000-142 practice exam 000-152 study guide 000-153 Exam questions 000-169 Test questions 000-170braindump torrent 000-171 dumps
000-200 practice exam 000-206 study guide 000-207 Exam questions 000-210 Test questions 000-210 braindump torrent 000-216 dumps
000-217 practice exam 000-253 study guide 000-255 Exam questions 000-314 Test questions 000-315 braindump torrent 000-316 dumps
000-330 practice exam 000-349 study guide 000-372 Exam questions 000-374 Test questions 000-377 braindump torrent 000-378 dumps
000-415 practice exam 000-418 study guide 000-419 Exam questions 000-420 Test questions 000-427 braindump torrent 000-428 dumps
000-430 practice exam 000-432 study guide 000-433 Exam questions 000-434 Test questions 000-434 braindump torrent 000-443 dumps
000-444 practice exam 000-445 study guide 000-447 Exam questions 000-530 Test questions 000-535 braindump torrent 000-544 dumps 70-663 test questions
This article is to my feelings, thanks for your sharing, hoping to see more useful content, refueling,We are a Chinese supplier, we provide the best bag bag and clothes,ghd Moncler clothing P90x Abercrombie clothes Moncler Jackets
we sell mbt all over the world, if you choose mbt tataga shoes we will give you promotion as discount mbt shoes and arrange shippment soon.
★Gucci 196 wallet with snap closure 190331 AH01G 2535 ★Gucci continental wallet with 203573 AH01G 4704 ★Gucci continental wallet with 112715 FT0GG 9774 ★Gucci continental wallet with 190350 FT0FG 9643 ★Gucci flap french wallet with 112664 FFPAG 8591 ★Gucci mini flap french wallet 112716 A0V1G 5350 ★Gucci mini wallet with tab snap 155173 A0V1G 5350 ★Gucci 0 continental wallet with 170426 FFPAG 9660 ★Gucci 197 flap french wallet with 112664 FFPAG 9691 ★Gucci continental wallet with 203573 AH01G 2535 ★Gucci continental wallet with 112715 F40IR 9643 ★Gucci continental wallet with 181668 BEG1G 1000 ★Gucci continental wallet with 154256 F4DYG 1000 ★Gucci continental wallet with 190350 BCBAG 1000 ★Gucci continental wallet with 190350 AA61G 9022 ★Gucci continental wallet with 190350 FT0FS 4060 ★Gucci continental wallet with 190336 FP1KG 1057 ★Gucci continental wallet with 190336 FCIEG 8526 ★Gucci continental wallet with 190336 FP1KG 8552 ★Gucci continental wallet with 212110 FVDBG 8420 ★Gucci continental wallet with 212089 FFP5G 9643 ★Gucci continental wallet with 212089 A0V1G 2019 ★Gucci continental wallet with 212089 A0V1G 1000 ★Gucci continental wallet with 212089 FFKTG 9774 ★Gucci continental wallet with 220089 EZ04G 1362 ★Gucci continental wallet with 220351 F4G1G 9780 ★Gucci continental wallet with 203573 AH01G 9022 ★Gucci continental wallet with D 154256 AA61G 2019 ★Gucci continental wallet with D 154256 F4DYG 9643 ★Gucci flap french wallet with 112664 A0V1G 2019 ★Gucci flap french wallet with 112664 F40IG 9773 ★Gucci flap french wallet with 112664 A0V1G 1000 ★Gucci flap french wallet with 112664 FT0GG 9774 ★Gucci flap french wallet with 112664 F40IR 9643 ★Gucci flap french wallet with 112664 FFPAG 9660 ★Gucci flap french wallet with 190349 FT0FS 4060 ★Gucci flap french wallet with 212090 FFP5G 1000 ★Gucci flap french wallet with 212090 FFKTG 9774 ★Gucci flap french wallet with 212090 A0V1G 2019 ★Gucci heart-shaped coin purse 152615 FFPAG 8591 ★Gucci mini flap french wallet 112716 A0V1G 1000 ★Gucci mini flap french wallet 112716 A0V1G 2019 ★Gucci mini wallet with bow 212106 FVDCG 9098 ★Gucci mini wallet with bow 212106 BDZ4G 6464 ★Gucci mini wallet with engraved 181670 F4FOG 8420 ★Gucci mini wallet with engraved 181670 FT0VG 6870 ★Gucci mini wallet with engraved 181670 FVE9G 8405 ★Gucci mini wallet with engraved gucci 181670 F4FOG 9791 ★Gucci wallet with D ring 154255 AA61G 2019 ★Gucci wallet with D ring 154255 F4DYG 9773
Those desperate miners are so fortunate to be alive. My prayers go out to them and their families. I do hope they make it out alive and don’t go crazy while locked so deep underground.I can only imagine what they are going through.
Those desperate miners are so fortunate to be alive. My prayers go out to them and their families.