2
Rails 3 App을 사용하고 있으며 비밀번호 재전송보기에서 오류 메시지를 조정해야합니다.Rails 3/Devise - 비밀번호 재설정을위한 오류 메시지 변경
Email not found
나는이이 오류 메시지를 변경할 필요가 있어요 :
We don't have an account with that e-mail address. Maybe you used another address?
나는 알고 이메일 주소의 사용자 유형과 그것을 제출하면, 현재 응용 프로그램이 오류 메시지가 표시됩니다 당신은 Devise YML 파일에서이를 조정할 수 있지만 어떻게해야하는지 모르겠다 ... 제안 사항은 무엇입니까?
작업 코드
class PasswordsController < Devise::PasswordsController
def create
user = User.find_by_email(params[:user][:email])
if user.nil?
flash.now[:notice] = "We don't have an account with that e-mail address. Maybe you used another address?"
end
super
end
end
감사와 비밀번호를 재설정 형태로 리디렉션 경우 확인하는 before_filter를 사용해보십시오 당신의 제안을 위해! 위의 작업 코드에 추가했습니다. – dennismonsewicz