Commit 31af2d3b
Changed files (3)
app
controllers
models
config
locales
app/controllers/passwords_controller.rb
@@ -8,7 +8,7 @@ class PasswordsController < ApplicationController
def update
user = current_user
if user.change_password(params[:user][:password], params[:user][:password_confirmation])
- #sign_in user, :bypass => true
+ sign_in user, :bypass => true
flash[:notice] = "Your password has been updated successfully!"
render :index
else
app/models/user.rb
@@ -37,7 +37,7 @@ class User < ActiveRecord::Base
def change_password(password, confirmation)
return false unless password == confirmation
self.password = password
- self.save!
+ self.save
end
def has_avatar?
config/locales/en.yml
@@ -4,5 +4,5 @@
en:
hello: "Hello world"
share_something: "You have not uploaded anything!"
- passwords_do_not_match: 'Oops... the passwords should match.'
+ passwords_do_not_match: 'The passwords should match and should be a minimum of 6 characters.'