On Wed, Aug 31, 2011 at 7:27 AM, Conrad Taylor <conra...@gmail.com> wrote:
> On Wed, Aug 31, 2011 at 7:04 AM, Bruno Meira <goesme...@gmail.com> wrote: > >> I have the following problem: >> - I have a controller called UsersController and I need to restrict >> the show URL to use only numbers, How can I do that? >> my routes.rb has this line: >> resources :users, :except=>[:destroy] >> How I add this constraint in this line? >> I know that there is a command :constraints, but I dont know how to >> use in resources ;/ >> Thanks :D >> >> > Bruno, I would recommend reading section 4.2 of the Rails routing guide: > > http://guides.rubyonrails.org/routing.html > http://guides.rubyonrails.org/routing.html#specifying-constraints > > Good luck, > > -Conrad > > >> -- >> >> You received this message because you are subscribed to the Google Groups >> "Ruby on Rails: Talk" group. >> To post to this group, send email to rubyonrails-talk@googlegroups.com. >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-talk?hl=en. >> >> > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.