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/example@gmail.com.json” for 127.0.0.1 at
2012-02-22 17:04:17 +0800ActionController::RoutingError (No route matches [PUT]
“/password/example@gmail.com.json”):
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