From f99636da76990da6f82c27410502935d65bb275c Mon Sep 17 00:00:00 2001 From: Abhishek kanojia Date: Sun, 22 Apr 2018 11:57:18 +0530 Subject: [PATCH] Remove redundant self from database_authenticatable module. --- lib/devise/models/database_authenticatable.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/devise/models/database_authenticatable.rb b/lib/devise/models/database_authenticatable.rb index 2211184f32..e5f98f6b7b 100644 --- a/lib/devise/models/database_authenticatable.rb +++ b/lib/devise/models/database_authenticatable.rb @@ -75,9 +75,9 @@ def update_with_password(params, *options) result = if valid_password?(current_password) update(params, *options) else - self.assign_attributes(params, *options) - self.valid? - self.errors.add(:current_password, current_password.blank? ? :blank : :invalid) + assign_attributes(params, *options) + valid? + errors.add(:current_password, current_password.blank? ? :blank : :invalid) false end @@ -113,8 +113,8 @@ def destroy_with_password(current_password) result = if valid_password?(current_password) destroy else - self.valid? - self.errors.add(:current_password, current_password.blank? ? :blank : :invalid) + valid? + errors.add(:current_password, current_password.blank? ? :blank : :invalid) false end