I have in my routes.rb (I am using Devise authentification …)
devise_for :users, :singular => :user, :path => :user
as :user do
get “user/changeEmail”, :to => “user/
credentials#change_email”, :as => :user_changeEmail
post “user/updateEmail”, :to => “user/
credentials#update_email”, :as => :user_updateEmail
end
running rake routes I can see :
…
user_changePassword GET /user/changePassword
{:controller=>“user/credentials”, :action=>“change_password”}
user_updatePassword POST /user/updatePassword
{:controller=>“user/credentials”, :action=>“update_password”}
…
user_changePassword_path display correctly the form
= form_for @user, :as => :user, :url =>
user_updatePassword_path, :html => {:method => :put} do |f|
…
and the submitting the form should send data to :url =>
user_updatePassword_path
but there is a routing error in the console
Started POST “/user/updatePassword?locale=en” for 127.0.0.1 at
2010-08-12 10:00:59 +0200
ActionController::RoutingError (No route matches “/user/
updatePassword”):
why no route matches it as it’s seems to be there in rake routes
list ?
thanks fyh