diff options
author | Francesco Rodriguez <lrodriguezsanc@gmail.com> | 2012-09-19 00:47:38 -0500 |
---|---|---|
committer | Francesco Rodriguez <lrodriguezsanc@gmail.com> | 2012-09-19 00:47:38 -0500 |
commit | efef82ffb0c3b5c3c2092f56793cd5940e9526cd (patch) | |
tree | c5fa3985b530653dad0cff7cb67345beef8b1b2f /activerecord | |
parent | 255cefbff44d0bf0faeec43a5112e88b7c4424c2 (diff) | |
download | rails-efef82ffb0c3b5c3c2092f56793cd5940e9526cd.tar.gz rails-efef82ffb0c3b5c3c2092f56793cd5940e9526cd.tar.bz2 rails-efef82ffb0c3b5c3c2092f56793cd5940e9526cd.zip |
fix :nodoc:s in AR::Timestamp [ci skip]
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/timestamp.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/activerecord/lib/active_record/timestamp.rb b/activerecord/lib/active_record/timestamp.rb index c32e0d6bf8..bf95ccb298 100644 --- a/activerecord/lib/active_record/timestamp.rb +++ b/activerecord/lib/active_record/timestamp.rb @@ -40,13 +40,13 @@ module ActiveRecord config_attribute :record_timestamps, instance_writer: true end - def initialize_dup(other) + def initialize_dup(other) # :nodoc: clear_timestamp_attributes end private - def create #:nodoc: + def create if self.record_timestamps current_time = current_time_from_proper_timezone @@ -60,7 +60,7 @@ module ActiveRecord super end - def update(*args) #:nodoc: + def update(*args) if should_record_timestamps? current_time = current_time_from_proper_timezone @@ -89,19 +89,19 @@ module ActiveRecord timestamp_attributes_for_create_in_model + timestamp_attributes_for_update_in_model end - def timestamp_attributes_for_update #:nodoc: + def timestamp_attributes_for_update [:updated_at, :updated_on] end - def timestamp_attributes_for_create #:nodoc: + def timestamp_attributes_for_create [:created_at, :created_on] end - def all_timestamp_attributes #:nodoc: + def all_timestamp_attributes timestamp_attributes_for_create + timestamp_attributes_for_update end - def current_time_from_proper_timezone #:nodoc: + def current_time_from_proper_timezone self.class.default_timezone == :utc ? Time.now.utc : Time.now end |