end
def lost_password
- if params[:user][:email]
+ if params[:user] and params[:user][:email]
user = User.find_by_email(params['user']['email'])
if user
user.token = User.make_token
else
flash[:notice] = "Couldn't find that email address, sorry."
end
+ else
+ render :action => 'lost_password'
end
end
map.connect '/user/save', :controller => 'user', :action => 'save'
map.connect '/user/confirm', :controller => 'user', :action => 'confirm'
map.connect '/user/go_public', :controller => 'user', :action => 'go_public'
+ map.connect '/user/reset_password', :controller => 'user', :action => 'reset_password'
map.connect '/index.html', :controller => 'site', :action => 'index'
map.connect '/edit.html', :controller => 'site', :action => 'edit'
map.connect '/search.html', :controller => 'way_tag', :action => 'search'