def create
      if account = Account.where(:email => params[:email], :activation_code => nil).first
        account.forgot_password!
        redirect_to login_path, :notice => t(:password_reset_link_has_been_sent)
      else
        flash[:alert] = t(:could_not_find_user_with_email_address)
        render :action => 'new'
      end
    end
def create
      if account = Account.where(:email => params[:email], :activation_code => nil).first
        account.forgot_password!
        redirect_to login_path, :notice => t(:password_reset_link_has_been_sent)
      else
        flash[:alert] = t(:could_not_find_user_with_email_address)
        render :action => 'new'
      end
    end
Forgot password