aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2008-05-20 12:37:35 +0200
committerXavier Noria <fxn@hashref.com>2008-05-20 12:37:35 +0200
commit633e9b4c5656a18dc5cb1eff95d47fc1824b2c27 (patch)
tree861d21dff6f30a0e4557bd208fdc6585caacc7b4 /activerecord
parent1148af4b3f8507c851be2f0bee103642937e8c29 (diff)
downloadrails-633e9b4c5656a18dc5cb1eff95d47fc1824b2c27.tar.gz
rails-633e9b4c5656a18dc5cb1eff95d47fc1824b2c27.tar.bz2
rails-633e9b4c5656a18dc5cb1eff95d47fc1824b2c27.zip
revised conventions in time zone related docs
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/attribute_methods.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/attribute_methods.rb b/activerecord/lib/active_record/attribute_methods.rb
index d753778d52..09346bec5c 100644
--- a/activerecord/lib/active_record/attribute_methods.rb
+++ b/activerecord/lib/active_record/attribute_methods.rb
@@ -162,8 +162,8 @@ module ActiveRecord
evaluate_attribute_method attr_name, "def #{attr_name}; unserialize_attribute('#{attr_name}'); end"
end
- # 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
+ # 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.
def define_read_method_for_time_zone_conversion(attr_name)
method_body = <<-EOV
def #{attr_name}(reload = false)
@@ -176,7 +176,7 @@ module ActiveRecord
evaluate_attribute_method attr_name, method_body
end
- # Define an attribute ? method.
+ # Defines a predicate method <tt>attr_name?</tt>.
def define_question_method(attr_name)
evaluate_attribute_method attr_name, "def #{attr_name}?; query_attribute('#{attr_name}'); end", "#{attr_name}?"
end
@@ -185,7 +185,7 @@ module ActiveRecord
evaluate_attribute_method attr_name, "def #{attr_name}=(new_value);write_attribute('#{attr_name}', new_value);end", "#{attr_name}="
end
- # Defined for all datetime and timestamp attributes when time_zone_aware_attributes are enabled.
+ # Defined for all +datetime+ and +timestamp+ attributes when +time_zone_aware_attributes+ are enabled.
# This enhanced write method will automatically convert the time passed to it to the zone stored in Time.zone.
def define_write_method_for_time_zone_conversion(attr_name)
method_body = <<-EOV