diff --git a/config/initializers/devise_security_extension.rb b/config/initializers/devise_security_extension.rb index b38393b75..5b13fc905 100644 --- a/config/initializers/devise_security_extension.rb +++ b/config/initializers/devise_security_extension.rb @@ -55,16 +55,13 @@ module Devise def password_expired? self.password_changed_at < self.expire_password_after.ago end - - end #module PasswordExpirable + end module SecureValidatable def self.included(base) base.extend ClassMethods assert_secure_validations_api!(base) - base.class_eval do - validate :current_equal_password_validation end end @@ -77,8 +74,6 @@ module Devise self.errors.add(:password, :equal_to_current_password) if dummy.valid_password?(self.password) end end - - end #module SecureValidatable - - end #module Models -end #module Devise \ No newline at end of file + end + end +end \ No newline at end of file diff --git a/db/migrate/20160901104320_add_password_expired.rb~ b/db/migrate/20160901104320_add_password_expired.rb~ deleted file mode 100644 index ac3a48f49..000000000 --- a/db/migrate/20160901104320_add_password_expired.rb~ +++ /dev/null @@ -1,4 +0,0 @@ -class AddPasswordExpired < ActiveRecord::Migration - def change - end -end diff --git a/spec/features/users_auth_spec.rb b/spec/features/users_auth_spec.rb index f16772fd4..bd58eabe0 100644 --- a/spec/features/users_auth_spec.rb +++ b/spec/features/users_auth_spec.rb @@ -333,7 +333,6 @@ feature 'Users' do fill_in 'user_password_confirmation', with: '123456789' click_button 'Change your password' expect(page).to have_content "must be different than the current password." - #expect(page).to have_content "You can not use the same password. Please choose another one." end