diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2018-07-02 13:43:06 +0300 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2018-07-09 16:13:08 +0300 |
commit | 4ee08b77bc5ae11553d59c182ea8292b77699115 (patch) | |
tree | 3aac1871cd8dcefc88d52f11dcacbf238b2340a9 /config/initializers/active_record_locking.rb | |
parent | 612f5e63b3cf76c354e50f4aa6c4163e5465b115 (diff) |
Updates from `rubocop -a`
Diffstat (limited to 'config/initializers/active_record_locking.rb')
-rw-r--r-- | config/initializers/active_record_locking.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/config/initializers/active_record_locking.rb b/config/initializers/active_record_locking.rb index 0861544c5a4..21ff323927b 100644 --- a/config/initializers/active_record_locking.rb +++ b/config/initializers/active_record_locking.rb @@ -17,7 +17,7 @@ module ActiveRecord lock_col = self.class.locking_column - previous_lock_value = send(lock_col).to_i # rubocop:disable GitlabSecurity/PublicSend + previous_lock_value = send(lock_col).to_i # This line is added as a patch previous_lock_value = nil if previous_lock_value == '0' || previous_lock_value == 0 @@ -47,7 +47,7 @@ module ActiveRecord # If something went wrong, revert the version. rescue Exception - send(lock_col + '=', previous_lock_value) # rubocop:disable GitlabSecurity/PublicSend + send(lock_col + '=', previous_lock_value) raise end end |