diff options
author | Neeraj Singh <neerajdotname@gmail.com> | 2010-07-29 10:37:19 -0400 |
---|---|---|
committer | Neeraj Singh <neerajdotname@gmail.com> | 2010-07-29 10:37:38 -0400 |
commit | e42945333b1cb8e387699524b19fbad7ae23dcb7 (patch) | |
tree | aac4e907794655e1cc950e8015be15c3b2cc42b6 /activerecord/lib | |
parent | 2b2ee222f3012a29c9db95d357a30029100b226b (diff) | |
download | rails-e42945333b1cb8e387699524b19fbad7ae23dcb7.tar.gz rails-e42945333b1cb8e387699524b19fbad7ae23dcb7.tar.bz2 rails-e42945333b1cb8e387699524b19fbad7ae23dcb7.zip |
moving time zone related documentation to timestamp.rb from base.rb
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/base.rb | 13 | ||||
-rw-r--r-- | activerecord/lib/active_record/timestamp.rb | 12 |
2 files changed, 12 insertions, 13 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index 99043af1a5..5898ec3732 100644 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -220,19 +220,6 @@ module ActiveRecord #:nodoc: # user = User.create(:preferences => %w( one two three )) # User.find(user.id).preferences # raises SerializationTypeMismatch # - # == Time Zone aware attributes - # - # By default, ActiveRecord::Base keeps all the datetime columns time zone aware by executing following code. - # - # ActiveRecord::Base.time_zone_aware_attributes = true - # - # This feature can easily be turned off by assigning value <tt>false</tt> . - # - # If your attributes are time zone aware and you desire to skip time zone conversion for certain attributes then you can do following: - # - # Topic.skip_time_zone_conversion_for_attributes = [:written_on] - # - # # == Single table inheritance # # Active Record allows inheritance by storing the name of the class in a column that by default is named "type" (can be changed diff --git a/activerecord/lib/active_record/timestamp.rb b/activerecord/lib/active_record/timestamp.rb index 6c1e376745..92f7a7753d 100644 --- a/activerecord/lib/active_record/timestamp.rb +++ b/activerecord/lib/active_record/timestamp.rb @@ -12,6 +12,18 @@ module ActiveRecord # Timestamps are in the local timezone by default but you can use UTC by setting: # # <tt>ActiveRecord::Base.default_timezone = :utc</tt> + # + # == Time Zone aware attributes + # + # By default, ActiveRecord::Base keeps all the datetime columns time zone aware by executing following code. + # + # ActiveRecord::Base.time_zone_aware_attributes = true + # + # This feature can easily be turned off by assigning value <tt>false</tt> . + # + # If your attributes are time zone aware and you desire to skip time zone conversion for certain attributes then you can do following: + # + # Topic.skip_time_zone_conversion_for_attributes = [:written_on] module Timestamp extend ActiveSupport::Concern |