aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/timestamp.rb
diff options
context:
space:
mode:
authorFranck Verrot <franck@verrot.fr>2011-01-25 23:33:55 +0100
committerSantiago Pastorino <santiago@wyeworks.com>2011-02-02 12:45:14 -0200
commita5b03e9c7af8f539764a66f9bd51b7ebbcb9f57d (patch)
treec78e22a64d431de9daabe9f196edaf49bd3c824e /activerecord/lib/active_record/timestamp.rb
parent47315760bc893a48738e6592a0cbb3fef506bcd7 (diff)
downloadrails-a5b03e9c7af8f539764a66f9bd51b7ebbcb9f57d.tar.gz
rails-a5b03e9c7af8f539764a66f9bd51b7ebbcb9f57d.tar.bz2
rails-a5b03e9c7af8f539764a66f9bd51b7ebbcb9f57d.zip
Implement and test private method all_timestamp_attributes_in_model
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
Diffstat (limited to 'activerecord/lib/active_record/timestamp.rb')
-rw-r--r--activerecord/lib/active_record/timestamp.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/timestamp.rb b/activerecord/lib/active_record/timestamp.rb
index 38cc2c9694..65d9d1fb19 100644
--- a/activerecord/lib/active_record/timestamp.rb
+++ b/activerecord/lib/active_record/timestamp.rb
@@ -74,6 +74,10 @@ module ActiveRecord
timestamp_attributes_for_update.select { |c| self.class.column_names.include?(c.to_s) }
end
+ def all_timestamp_attributes_in_model
+ timestamp_attributes_for_create_in_model + timestamp_attributes_for_update_in_model
+ end
+
def timestamp_attributes_for_update #:nodoc:
[:updated_at, :updated_on]
end