From 4940d6d096a581d46addecd9b41bbd62af3e1888 Mon Sep 17 00:00:00 2001 From: Alvaro Pereyra Date: Sat, 1 Dec 2012 15:19:34 -0500 Subject: Cleans and removes useless 'Examples' tag [ci skip] --- activerecord/lib/active_record/relation/calculations.rb | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'activerecord/lib/active_record') 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 -- cgit v1.2.3