aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/relation/calculations.rb
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2016-09-14 17:57:52 +0900
committerRyuta Kamizono <kamipo@gmail.com>2016-09-14 18:26:32 +0900
commit3464cd5c288323ca115a4929d1e6b435c4afc8d4 (patch)
treead2e1380ede0a1789c7c1a7bffb1f43b465c4105 /activerecord/lib/active_record/relation/calculations.rb
parent92703a9ea5d8b96f30e0b706b801c9185ef14f0e (diff)
downloadrails-3464cd5c288323ca115a4929d1e6b435c4afc8d4.tar.gz
rails-3464cd5c288323ca115a4929d1e6b435c4afc8d4.tar.bz2
rails-3464cd5c288323ca115a4929d1e6b435c4afc8d4.zip
Fix broken comments indentation caused by rubocop auto-correct [ci skip]
All indentation was normalized by rubocop auto-correct at 80e66cc4d90bf8c15d1a5f6e3152e90147f00772. But comments was still kept absolute position. This commit aligns comments with method definitions for consistency.
Diffstat (limited to 'activerecord/lib/active_record/relation/calculations.rb')
-rw-r--r--activerecord/lib/active_record/relation/calculations.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/activerecord/lib/active_record/relation/calculations.rb b/activerecord/lib/active_record/relation/calculations.rb
index a796e35261..09ca30e434 100644
--- a/activerecord/lib/active_record/relation/calculations.rb
+++ b/activerecord/lib/active_record/relation/calculations.rb
@@ -325,13 +325,13 @@ module ActiveRecord
end]
end
- # Converts the given keys to the value that the database adapter returns as
- # a usable column name:
- #
- # column_alias_for("users.id") # => "users_id"
- # column_alias_for("sum(id)") # => "sum_id"
- # column_alias_for("count(distinct users.id)") # => "count_distinct_users_id"
- # column_alias_for("count(*)") # => "count_all"
+ # Converts the given keys to the value that the database adapter returns as
+ # a usable column name:
+ #
+ # column_alias_for("users.id") # => "users_id"
+ # column_alias_for("sum(id)") # => "sum_id"
+ # column_alias_for("count(distinct users.id)") # => "count_distinct_users_id"
+ # column_alias_for("count(*)") # => "count_all"
def column_alias_for(keys)
if keys.respond_to? :name
keys = "#{keys.relation.name}.#{keys.name}"