diff options
author | Marcel Molina <marcel@vernix.org> | 2007-11-06 23:33:40 +0000 |
---|---|---|
committer | Marcel Molina <marcel@vernix.org> | 2007-11-06 23:33:40 +0000 |
commit | 94502623fb8354ba0c88b9d1bc94bf940e0d5018 (patch) | |
tree | 3feef6b8342bac8a8f8ef3db5f051e536bce8a4f /activerecord/lib/active_record/calculations.rb | |
parent | 19d4c212cd35be37d67eb20bb4152356df96681b (diff) | |
download | rails-94502623fb8354ba0c88b9d1bc94bf940e0d5018.tar.gz rails-94502623fb8354ba0c88b9d1bc94bf940e0d5018.tar.bz2 rails-94502623fb8354ba0c88b9d1bc94bf940e0d5018.zip |
Standardize on using hyphens rather than colons to separate option names from their explanation in documentation. Replace + with tt tags. Closes #8732. [ryanb]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8106 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record/calculations.rb')
-rw-r--r-- | activerecord/lib/active_record/calculations.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/activerecord/lib/active_record/calculations.rb b/activerecord/lib/active_record/calculations.rb index 5ce31197d4..9620ce1b20 100644 --- a/activerecord/lib/active_record/calculations.rb +++ b/activerecord/lib/active_record/calculations.rb @@ -97,14 +97,14 @@ module ActiveRecord # end # # Options: - # * <tt>:conditions</tt>: An SQL fragment like "administrator = 1" or [ "user_name = ?", username ]. See conditions in the intro. - # * <tt>:joins</tt>: An SQL fragment for additional joins like "LEFT JOIN comments ON comments.post_id = id". (Rarely needed). + # * <tt>:conditions</tt> - An SQL fragment like "administrator = 1" or [ "user_name = ?", username ]. See conditions in the intro. + # * <tt>:joins</tt> - An SQL fragment for additional joins like "LEFT JOIN comments ON comments.post_id = id". (Rarely needed). # The records will be returned read-only since they will have attributes that do not correspond to the table's columns. - # * <tt>:order</tt>: An SQL fragment like "created_at DESC, name" (really only used with GROUP BY calculations). - # * <tt>:group</tt>: An attribute name by which the result should be grouped. Uses the GROUP BY SQL-clause. - # * <tt>:select</tt>: By default, this is * as in SELECT * FROM, but can be changed if you for example want to do a join, but not + # * <tt>:order</tt> - An SQL fragment like "created_at DESC, name" (really only used with GROUP BY calculations). + # * <tt>:group</tt> - An attribute name by which the result should be grouped. Uses the GROUP BY SQL-clause. + # * <tt>:select</tt> - By default, this is * as in SELECT * FROM, but can be changed if you for example want to do a join, but not # include the joined columns. - # * <tt>:distinct</tt>: Set this to true to make this a distinct calculation, such as SELECT COUNT(DISTINCT posts.id) ... + # * <tt>:distinct</tt> - Set this to true to make this a distinct calculation, such as SELECT COUNT(DISTINCT posts.id) ... # # Examples: # Person.calculate(:count, :all) # The same as Person.count |