Unknown Route?

Looks prettier @ http://bit.ly/dRaTCm if you want it :slight_smile: 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) -%>

Looks prettier @ http://bit.ly/dRaTCm if you want it :slight_smile: 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