Newbie here, I am trying to set up Routes so that it will look up a listing in my directory by sanitized phone number, like the following: www.domiain.com/5405551212 which will in turn list all the listings with that phone number (though they might be in the Db table with parenthesis and hyphens), if one listing, then make it a special render If anyone could help with my Routes code and my controller, I would appreciate it Tim -- Posted via http://www.ruby-forum.com/.
map.connect '':phone'', :controller => ''yourcontroller'' This will invoke yourcontroller at method index, and the phone number would be in params[:phone] I think. :-) -- -- Tom Mornini On Jan 22, 2006, at 9:29 PM, Timothy Johnson wrote:> Newbie here, I am trying to set up Routes so that it will look up a > listing in my directory by sanitized phone number, like the following: > > www.domiain.com/5405551212 > > which will in turn list all the listings with that phone number > (though > they might be in the Db table with parenthesis and hyphens), if one > listing, then make it a special render > > If anyone could help with my Routes code and my controller, I would > appreciate it > > Tim > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails
Tom Mornini wrote:> map.connect '':phone'', :controller => ''yourcontroller'' > > This will invoke yourcontroller at method index, and > the phone number would be in params[:phone] >Yes, this does work well enough thank you. -- Posted via http://www.ruby-forum.com/.
Maybe Matching Threads
- [FORGED] Re: Plotmath on Fedora 31 broken with with pango >= 1.44 - workarounds?
- Regular expression to define contents between parentheses
- Story problem if parenthesis used in Given, When, Then or And
- Bug in RedCloth or in my head?
- Dealing with parentheses within variable names