Autofix Rubocop Style/IfUnlessModifier (#23697)
This commit is contained in:
parent
9ab2a775c9
commit
e2a3ebb271
40 changed files with 55 additions and 271 deletions
|
@ -30,9 +30,7 @@ class Auth::RegistrationsController < Devise::RegistrationsController
|
|||
|
||||
def update
|
||||
super do |resource|
|
||||
if resource.saved_change_to_encrypted_password?
|
||||
resource.clear_other_sessions(current_session.session_id)
|
||||
end
|
||||
resource.clear_other_sessions(current_session.session_id) if resource.saved_change_to_encrypted_password?
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -110,9 +110,7 @@ class Auth::SessionsController < Devise::SessionsController
|
|||
def home_paths(resource)
|
||||
paths = [about_path]
|
||||
|
||||
if single_user_mode? && resource.is_a?(User)
|
||||
paths << short_account_path(username: resource.account)
|
||||
end
|
||||
paths << short_account_path(username: resource.account) if single_user_mode? && resource.is_a?(User)
|
||||
|
||||
paths
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue