diff options
author | Francesco Rodriguez <lrodriguezsanc@gmail.com> | 2012-09-21 22:47:08 -0500 |
---|---|---|
committer | Francesco Rodriguez <lrodriguezsanc@gmail.com> | 2012-09-21 22:47:37 -0500 |
commit | c57064a8ab22906cc3f5b4cc6845ac5e1e1a384d (patch) | |
tree | 741ee0dc233f62a33288324e80802adc69036399 /activerecord/lib/active_record/attribute_methods/write.rb | |
parent | fe78e1dad6af88a08715abcad0e6e4e2d5c9b262 (diff) | |
download | rails-c57064a8ab22906cc3f5b4cc6845ac5e1e1a384d.tar.gz rails-c57064a8ab22906cc3f5b4cc6845ac5e1e1a384d.tar.bz2 rails-c57064a8ab22906cc3f5b4cc6845ac5e1e1a384d.zip |
update AR/attribute_methods documentation [ci skip]
Diffstat (limited to 'activerecord/lib/active_record/attribute_methods/write.rb')
-rw-r--r-- | activerecord/lib/active_record/attribute_methods/write.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/attribute_methods/write.rb b/activerecord/lib/active_record/attribute_methods/write.rb index 5a39cb0125..6eb9e25fd9 100644 --- a/activerecord/lib/active_record/attribute_methods/write.rb +++ b/activerecord/lib/active_record/attribute_methods/write.rb @@ -20,8 +20,9 @@ module ActiveRecord end end - # Updates the attribute identified by <tt>attr_name</tt> with the specified +value+. Empty strings - # for fixnum and float columns are turned into +nil+. + # Updates the attribute identified by <tt>attr_name</tt> with the + # specified +value+. Empty strings for fixnum and float columns are + # turned into +nil+. def write_attribute(attr_name, value) attr_name = attr_name.to_s attr_name = self.class.primary_key if attr_name == 'id' && self.class.primary_key |