On Mon, Oct 31, 2011 at 9:36 PM, Nikhil Goyal wrote:
On Nov 1, 2:57 am, Everaldo Gomes wrote:
Hi!

Try this:

match ':/:token' => 'users#new' , constraints => { :token =>
/[a-zA-Z0-9]{8}/ }

There is \w in regexp that means letter, number and underscore
(accordlying
rubular.com) , but I don't know if your token accepts underscores.

No there are no underscores. only alphabets and numbers.
So, try using /[a-zA-Z0-9]/ as your constraint. I can't remember a shortcut
for alphanumeric, if there is one.



--
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+unsubscribe@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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 4 of 4 | next ›
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedOct 31, '11 at 9:33p
activeNov 1, '11 at 12:03a
posts4
users2
websiterubyonrails.org
irc#RubyOnRails

2 users in discussion

Everaldo Gomes: 2 posts Nikhil Goyal: 2 posts

People

Translate

site design / logo © 2021 Grokbase