aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/relation
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2016-09-06 18:11:21 +0200
committerGitHub <noreply@github.com>2016-09-06 18:11:21 +0200
commit1722397f9a63f74bc7ff633895aec7109568a25b (patch)
tree78c05f68cc5bfe6eeed1eea9f9f68c40518903fb /activerecord/lib/active_record/relation
parent2e4eb03925ae5854691a4318787e7707358615e8 (diff)
parentfbccae4d190c91aa689defc2fbf25744b369df05 (diff)
downloadrails-1722397f9a63f74bc7ff633895aec7109568a25b.tar.gz
rails-1722397f9a63f74bc7ff633895aec7109568a25b.tar.bz2
rails-1722397f9a63f74bc7ff633895aec7109568a25b.zip
Merge pull request #26405 from alexcameron89/case_statement_formatting
Fix Remaining Case-In-Assignment Statement Formatting
Diffstat (limited to 'activerecord/lib/active_record/relation')
-rw-r--r--activerecord/lib/active_record/relation/query_methods.rb11
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)