Rails 3アプリを使用していますが、パスワード再送ビューのエラーメッセージを調整する必要があります。ユーザーがメールアドレスを入力して送信すると、現在、アプリは次のエラーメッセージを表示します。
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