Re: [Rails] Unknown Route?
> Looks prettier @ http://bit.ly/dRaTCm if you want it :) Anyone I'm a bit
> stumped here.
>
> Error:
> No route matches {:controller=>"users", :action=>"confirm",
> :username=>"Mohammad",
> :code=>"%242a%2410%24%2FN5mhFlnu.VJ.DMdzh3ob.%2FQAbSb82nHZuZDAl%2F27726MKm6kfLbW"}
>
> Route:
> get 'users/confirm/:username/:code' => 'users#confirm', :as =>
> 'user_confirmation'
>
> Code:
> <% url = user_confirmation_url(:username => @user.username, :code =>
> @user.confirmation_code, :only_path => false) -%>
> <% url = user_confirmation_path(:username => @user.username, :code =>
> @user.confirmation_code, :only_path => false) -%>
You need to tell the route that dots/periods are valid in :code... That is set a requirement with a regex that explicitly allows periods.
Otherwise rails is chopping that :code string off at the ".VJ" part and trying to use that as the format.
-philip
--
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.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home