diff --git a/.rubocop.yml b/.rubocop.yml index 1205d53b..decec640 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -88,6 +88,10 @@ Style/AlignHash: Style/AlignParameters: Enabled: true +# Use && instead of and, use || instead of or +Style/AndOr: + Enabled: true + AllCops: Include: - '**/Rakefile' diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 1685d43c..0a24cae6 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -7,12 +7,6 @@ - -# Offense count: 2 -# Cop supports --auto-correct. -Style/AndOr: - Enabled: false - # Offense count: 1 Style/BlockNesting: Max: 4 diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 2a27b803..0219a4ca 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -6,7 +6,7 @@ class ApplicationController < ActionController::Base helper_method :date_string def store_location - session[:return_to] = request.fullpath if request.get? and controller_name != "user_sessions" and controller_name != "sessions" + session[:return_to] = request.fullpath if request.get? && controller_name != "user_sessions" && controller_name != "sessions" end def after_sign_in_path_for(resource)