Updating views and helpers to use i18n by default.

This commit is contained in:
Carlos A. da Silva
2009-10-08 12:14:10 -03:00
parent 72d1fe4572
commit 42d00a8dea
10 changed files with 60 additions and 19 deletions

View File

@@ -7,7 +7,7 @@ class PasswordsController < ApplicationController
def create
@password = User.send_reset_password_instructions(params[:password])
if @password.errors.empty?
flash[:notice] = I18n.t(:send_instructions, :scope => [:devise, :password], :default => 'You will receive an email with instructions about how to reset your password in a few minutes.')
flash[:notice] = I18n.t(:send_instructions, :scope => [:devise, :passwords], :default => 'You will receive an email with instructions about how to reset your password in a few minutes.')
redirect_to new_session_path
else
render :new
@@ -22,7 +22,7 @@ class PasswordsController < ApplicationController
def update
@password = User.reset_password!(params[:password])
if @password.errors.empty?
flash[:notice] = I18n.t(:update, :scope => [:devise, :password], :default => 'Your password was changed successfully.')
flash[:notice] = I18n.t(:update, :scope => [:devise, :passwords], :default => 'Your password was changed successfully.')
redirect_to new_session_path
else
render :edit