diff options
author | Gonçalo Silva <goncalossilva@gmail.com> | 2010-08-10 18:15:12 +0100 |
---|---|---|
committer | Gonçalo Silva <goncalossilva@gmail.com> | 2010-08-10 18:15:12 +0100 |
commit | 62658500049fbb7a5e7d75537dd6f6a374204207 (patch) | |
tree | 8892d8305ced43866068a6c1c66548e465e45b38 /activerecord/lib/active_record/attribute_methods | |
parent | cd2bbed9846d84a1230a1b9e52843eedca17b28d (diff) | |
parent | e86cced311539932420f9cda49d736606d106c28 (diff) | |
download | rails-62658500049fbb7a5e7d75537dd6f6a374204207.tar.gz rails-62658500049fbb7a5e7d75537dd6f6a374204207.tar.bz2 rails-62658500049fbb7a5e7d75537dd6f6a374204207.zip |
Merge branch 'master' of http://github.com/rails/rails
Diffstat (limited to 'activerecord/lib/active_record/attribute_methods')
-rw-r--r-- | activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb | 3 | ||||
-rw-r--r-- | activerecord/lib/active_record/attribute_methods/write.rb | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb b/activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb index 783d61383b..8f0aacba42 100644 --- a/activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb +++ b/activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb @@ -14,7 +14,8 @@ module ActiveRecord module ClassMethods protected # Defined for all +datetime+ and +timestamp+ attributes when +time_zone_aware_attributes+ are enabled. - # This enhanced read method automatically converts the UTC time stored in the database to the time zone stored in Time.zone. + # This enhanced read method automatically converts the UTC time stored in the database to the time + # zone stored in Time.zone. def define_method_attribute(attr_name) if create_time_zone_conversion_attribute?(attr_name, columns_hash[attr_name]) method_body, line = <<-EOV, __LINE__ + 1 diff --git a/activerecord/lib/active_record/attribute_methods/write.rb b/activerecord/lib/active_record/attribute_methods/write.rb index e31acac050..7a2de3bf80 100644 --- a/activerecord/lib/active_record/attribute_methods/write.rb +++ b/activerecord/lib/active_record/attribute_methods/write.rb @@ -14,8 +14,8 @@ 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' |