diff options
author | Alex Kitchens <alexcameron98@gmail.com> | 2016-09-06 09:34:09 -0500 |
---|---|---|
committer | Alex Kitchens <alexcameron98@gmail.com> | 2016-09-06 09:34:09 -0500 |
commit | fbccae4d190c91aa689defc2fbf25744b369df05 (patch) | |
tree | b7b1de8dcd6ba48ada590ded7268938007a40e0f /activerecord/lib/active_record/relation/query_methods.rb | |
parent | 38fae35d53a029ee5b9c1192cb67ce2aa28f3904 (diff) | |
download | rails-fbccae4d190c91aa689defc2fbf25744b369df05.tar.gz rails-fbccae4d190c91aa689defc2fbf25744b369df05.tar.bz2 rails-fbccae4d190c91aa689defc2fbf25744b369df05.zip |
Fix Remaining Case-In-Assignment Statement Formatting
Recently, the Rails team made an effort to keep the source code consistent, using Ruboco
(bb1ecdcc677bf6e68e0252505509c089619b5b90 and below). Some of the case
statements were missed.
This changes the case statements' formatting and is consistent with changes
in 810dff7c9fa9b2a38eb1560ce0378d760529ee6b and db63406cb007ab3756d2a96d2e0b5d4e777f8231.
Diffstat (limited to 'activerecord/lib/active_record/relation/query_methods.rb')
-rw-r--r-- | activerecord/lib/active_record/relation/query_methods.rb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/activerecord/lib/active_record/relation/query_methods.rb b/activerecord/lib/active_record/relation/query_methods.rb index 6728a42dca..78570140e5 100644 --- a/activerecord/lib/active_record/relation/query_methods.rb +++ b/activerecord/lib/active_record/relation/query_methods.rb @@ -59,11 +59,12 @@ module ActiveRecord FROZEN_EMPTY_HASH = {}.freeze Relation::VALUE_METHODS.each do |name| - method_name = case name - when *Relation::MULTI_VALUE_METHODS then "#{name}_values" - when *Relation::SINGLE_VALUE_METHODS then "#{name}_value" - when *Relation::CLAUSE_METHODS then "#{name}_clause" - end + method_name = \ + case name + when *Relation::MULTI_VALUE_METHODS then "#{name}_values" + when *Relation::SINGLE_VALUE_METHODS then "#{name}_value" + when *Relation::CLAUSE_METHODS then "#{name}_clause" + end class_eval <<-CODE, __FILE__, __LINE__ + 1 def #{method_name} # def includes_values get_value(#{name.inspect}) # get_value(:includes) |