I have configured a route in config.rb
resources :password
When the parameter not an email address, it is working fine.
When the parameter is an email address it will show me the error:
Started PUT "/password/[email protected]" for 127.0.0.1 at 2012-02-22 17:04:17 +0800
ActionController::RoutingError (No route matches [PUT] "/password/[email protected]"):
UPDATE1
this is my password controller
def update
return_info = User.change_password(params[:id],params[:old],params[:newpw],params[:newpw2])
respond_to do |format|
format.json { render :json => {:info => t(return_info)} }
end
end
Thank you.
if you use custom string instead of id try
resources :password, :constraints => { :id => /.*/ }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With