I have done very little with customizing routes so this is new for me.

I would like to send users to my users controller only if it follows a
particular pattern.  I think that I might be able to use requirements
for this?

I've got this so far, but it's not quite working.

map.user ':user', :controller => 'users', :action => 'show',
:requirements => {:user => /[-+]/ }


I want this url to work www.domain.com/first-last

I want this domain to fail www.domain.com/firstlast

The problem is that "firstlast" goes to the users controller and fails.
The only way to get out of it is a rescue with a redirect to a 404 page.
I'd like to handle this in the routes instead of going to the
controller.

Is that possible and if so, any help with what I have so far would be
appreciated.

Thanks.
-- 
Posted via http://www.ruby-forum.com/.

-- 
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-t...@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.

Reply via email to