Browse files

update AR::AttributeAssignment documentation [ci skip]

  • Loading branch information...
1 parent 1102aa2 commit 19a41ebaf5868329467eec183f41276a6e1e6d88 Francesco Rodriguez committed Sep 18, 2012
Showing with 5 additions and 5 deletions.
  1. +5 −5 activerecord/lib/active_record/attribute_assignment.rb
View
10 activerecord/lib/active_record/attribute_assignment.rb
@@ -6,11 +6,11 @@ module AttributeAssignment
include ActiveModel::ForbiddenAttributesProtection
# Allows you to set all the attributes by passing in a hash of attributes with
- # keys matching the attribute names (which again matches the column names)
+ # keys matching the attribute names (which again matches the column names).
#
- # If the passed hash responds to permitted? method and the return value
- # of this method is false an ActiveModel::ForbiddenAttributesError exception
- # is raised.
+ # If the passed hash responds to <tt>permitted?</tt> method and the return value
+ # of this method is +false+ an <tt>ActiveModel::ForbiddenAttributesError</tt>
+ # exception is raised.
def assign_attributes(new_attributes)
return if new_attributes.blank?
@@ -59,7 +59,7 @@ def assign_nested_parameter_attributes(pairs)
# written_on (a date type) with Date.new("2004", "6", "24"). You can also specify a typecast character in the
# parentheses to have the parameters typecasted before they're used in the constructor. Use i for Fixnum,
# f for Float, s for String, and a for Array. If all the values for a given attribute are empty, the
- # attribute will be set to nil.
+ # attribute will be set to +nil+.
def assign_multiparameter_attributes(pairs)
execute_callstack_for_multiparameter_attributes(
extract_callstack_for_multiparameter_attributes(pairs)

0 comments on commit 19a41eb

Please sign in to comment.