aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorAlvaro Pereyra <alvaro@xendacentral.com>2012-12-01 15:19:34 -0500
committerAlvaro Pereyra <alvaro@xendacentral.com>2012-12-01 15:19:45 -0500
commit4940d6d096a581d46addecd9b41bbd62af3e1888 (patch)
tree7b52d9d8260c9b2e5afa35a8180e244c9605565c /activerecord/lib/active_record
parent82ebe186e6037115c958cbb2c9ff34a3fb7d3eb0 (diff)
downloadrails-4940d6d096a581d46addecd9b41bbd62af3e1888.tar.gz
rails-4940d6d096a581d46addecd9b41bbd62af3e1888.tar.bz2
rails-4940d6d096a581d46addecd9b41bbd62af3e1888.zip
Cleans and removes useless 'Examples' tag [ci skip]
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/relation/calculations.rb9
1 files changed, 2 insertions, 7 deletions
diff --git a/activerecord/lib/active_record/relation/calculations.rb b/activerecord/lib/active_record/relation/calculations.rb
index 99e77e007a..ccc14dddeb 100644
--- a/activerecord/lib/active_record/relation/calculations.rb
+++ b/activerecord/lib/active_record/relation/calculations.rb
@@ -76,18 +76,17 @@ module ActiveRecord
#
# values = Person.group('last_name').maximum(:age)
# puts values["Drake"]
- # => 43
+ # # => 43
#
# drake = Family.find_by_last_name('Drake')
# values = Person.group(:family).maximum(:age) # Person belongs_to :family
# puts values[drake]
- # => 43
+ # # => 43
#
# values.each do |family, max_age|
# ...
# end
#
- # Examples:
# Person.calculate(:count, :all) # The same as Person.count
# Person.average(:age) # SELECT AVG(age) FROM people...
#
@@ -124,8 +123,6 @@ module ActiveRecord
# the plucked column names, if they can be deduced. Plucking an SQL fragment
# returns String values by default.
#
- # Examples:
- #
# Person.pluck(:id)
# # SELECT people.id FROM people
# # => [1, 2, 3]
@@ -182,8 +179,6 @@ module ActiveRecord
# Pluck all the ID's for the relation using the table's primary key
#
- # Examples:
- #
# Person.ids # SELECT people.id FROM people
# Person.joins(:companies).ids # SELECT people.id FROM people INNER JOIN companies ON companies.person_id = people.id
def ids