From b2c1e29c14b91b290b30c928c63253d1555e0fd9 Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Sun, 19 Aug 2018 08:12:05 +0900 Subject: Enable Style/ParenthesesAroundCondition cop To prevent style check in review like https://github.com/rails/rails/pull/33608#discussion_r211087605. --- activerecord/lib/active_record/associations/builder/belongs_to.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord') diff --git a/activerecord/lib/active_record/associations/builder/belongs_to.rb b/activerecord/lib/active_record/associations/builder/belongs_to.rb index b5fb0092d7..0166ed98ca 100644 --- a/activerecord/lib/active_record/associations/builder/belongs_to.rb +++ b/activerecord/lib/active_record/associations/builder/belongs_to.rb @@ -34,7 +34,7 @@ module ActiveRecord::Associations::Builder # :nodoc: foreign_key = reflection.foreign_key cache_column = reflection.counter_cache_column - if (@_after_replace_counter_called ||= false) + if @_after_replace_counter_called ||= false @_after_replace_counter_called = false elsif association(reflection.name).target_changed? if reflection.polymorphic? -- cgit v1.2.3