Permalink
Browse files

Applied list conventions in AR::Base

  • Loading branch information...
1 parent 5bd1842 commit 370f4f51722cec49ace17093d29e9ce9e8f15cfb @sunny sunny committed May 7, 2008
Showing with 20 additions and 21 deletions.
  1. +20 −21 activerecord/lib/active_record/base.rb
@@ -633,8 +633,8 @@ def create(attributes = nil, &block)
#
# ==== Attributes
#
- # * +id+ This should be the id or an array of ids to be updated
- # * +attributes+ This should be a Hash of attributes to be set on the object, or an array of Hashes.
+ # * +id+ - This should be the id or an array of ids to be updated.
+ # * +attributes+ - This should be a Hash of attributes to be set on the object, or an array of Hashes.
#
# ==== Examples
#
@@ -663,7 +663,7 @@ def update(id, attributes)
#
# ==== Attributes
#
- # * +id+ Can be either an Integer or an Array of Integers
+ # * +id+ - Can be either an Integer or an Array of Integers.
#
# ==== Examples
#
@@ -686,7 +686,7 @@ def delete(id)
#
# ==== Attributes
#
- # * +id+ Can be either an Integer or an Array of Integers
+ # * +id+ - Can be either an Integer or an Array of Integers.
#
# ==== Examples
#
@@ -709,10 +709,10 @@ def destroy(id)
#
# ==== Attributes
#
- # * +updates+ A String of column and value pairs that will be set on any records that match conditions
- # * +conditions+ An SQL fragment like "administrator = 1" or [ "user_name = ?", username ].
- # See conditions in the intro for more info.
- # * +options+ Additional options are <tt>:limit</tt> and/or <tt>:order</tt>, see the examples for usage.
+ # * +updates+ - A String of column and value pairs that will be set on any records that match conditions.
+ # * +conditions+ - An SQL fragment like "administrator = 1" or [ "user_name = ?", username ].
+ # See conditions in the intro for more info.
+ # * +options+ - Additional options are <tt>:limit</tt> and/or <tt>:order</tt>, see the examples for usage.
#
# ==== Examples
#
@@ -741,7 +741,7 @@ def update_all(updates, conditions = nil, options = {})
#
# ==== Attributes
#
- # * +conditions+ Conditions are specified the same way as with +find+ method.
+ # * +conditions+ - Conditions are specified the same way as with +find+ method.
#
# ==== Example
#
@@ -759,7 +759,7 @@ def destroy_all(conditions = nil)
#
# ==== Attributes
#
- # * +conditions+ Conditions are specified the same way as with +find+ method.
+ # * +conditions+ - Conditions are specified the same way as with +find+ method.
#
# ==== Example
#
@@ -779,7 +779,7 @@ def delete_all(conditions = nil)
#
# ==== Attributes
#
- # * +sql+ An SQL statement which should return a count query from the database, see the example below
+ # * +sql+ - An SQL statement which should return a count query from the database, see the example below.
#
# ==== Examples
#
@@ -797,10 +797,9 @@ def count_by_sql(sql)
#
# ==== Attributes
#
- # * +id+ The id of the object you wish to update a counter on
- # * +counters+ An Array of Hashes containing the names of the fields
- # to update as keys and the amount to update the field by as
- # values
+ # * +id+ - The id of the object you wish to update a counter on.
+ # * +counters+ - An Array of Hashes containing the names of the fields
+ # to update as keys and the amount to update the field by as values.
#
# ==== Examples
#
@@ -828,8 +827,8 @@ def update_counters(id, counters)
#
# ==== Attributes
#
- # * +counter_name+ The name of the field that should be incremented
- # * +id+ The id of the object that should be incremented
+ # * +counter_name+ - The name of the field that should be incremented.
+ # * +id+ - The id of the object that should be incremented.
#
# ==== Examples
#
@@ -845,8 +844,8 @@ def increment_counter(counter_name, id)
#
# ==== Attributes
#
- # * +counter_name+ The name of the field that should be decremented
- # * +id+ The id of the object that should be decremented
+ # * +counter_name+ - The name of the field that should be decremented.
+ # * +id+ - The id of the object that should be decremented.
#
# ==== Examples
#
@@ -934,8 +933,8 @@ def readonly_attributes
#
# ==== Attributes
#
- # * +attr_name+ The field name that should be serialized
- # * +class_name+ Optional, class name that the object type should be equal to
+ # * +attr_name+ - The field name that should be serialized.
+ # * +class_name+ - Optional, class name that the object type should be equal to.
#
# ==== Example
# # Serialize a preferences attribute

0 comments on commit 370f4f5

Please sign in to comment.