diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2017-10-31 01:47:35 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-31 01:47:35 -0400 |
commit | a8ebd48559bea8893aa299f9e27758da0807ef24 (patch) | |
tree | b0ef2612159498f9cb9d540fb4982b8d664ca714 /activerecord | |
parent | 2240d4439910232ff6ad906edc03bed9bbe2001a (diff) | |
parent | c40b4428e6d3885a8adc0ceba3aeac7599c14879 (diff) | |
download | rails-a8ebd48559bea8893aa299f9e27758da0807ef24.tar.gz rails-a8ebd48559bea8893aa299f9e27758da0807ef24.tar.bz2 rails-a8ebd48559bea8893aa299f9e27758da0807ef24.zip |
Merge pull request #31004 from shuheiktgw/remove_unnecessary_returns
Remove redundant return statements
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/attribute_methods.rb | 2 | ||||
-rw-r--r-- | activerecord/lib/active_record/counter_cache.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/attribute_methods.rb b/activerecord/lib/active_record/attribute_methods.rb index 891e556dc4..23d2aef214 100644 --- a/activerecord/lib/active_record/attribute_methods.rb +++ b/activerecord/lib/active_record/attribute_methods.rb @@ -236,7 +236,7 @@ module ActiveRecord return has_attribute?(name) end - return true + true end # Returns +true+ if the given attribute is in the attributes hash, otherwise +false+. diff --git a/activerecord/lib/active_record/counter_cache.rb b/activerecord/lib/active_record/counter_cache.rb index 5005d58f1c..ee4f818cbf 100644 --- a/activerecord/lib/active_record/counter_cache.rb +++ b/activerecord/lib/active_record/counter_cache.rb @@ -53,7 +53,7 @@ module ActiveRecord unscoped.where(primary_key => object.id).update_all(updates) end - return true + true end # A generic "counter updater" implementation, intended primarily to be |