From 1370d1578727bdbfee06ccdf2109e8ca5649a652 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Mon, 26 Nov 2007 22:45:03 +0000 Subject: Make the record_timestamps class-inheritable so it can be set per model. References #10004. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8217 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/CHANGELOG | 2 ++ activerecord/lib/active_record/timestamp.rb | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG index 97132e3fdb..611c3d703e 100644 --- a/activerecord/CHANGELOG +++ b/activerecord/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Make the record_timestamps class-inheritable so it can be set per model. #10004 [tmacedo] + * Allow validates_acceptance_of to use a real attribute instead of only virtual (so you can record that the acceptance occured) #7457 [ambethia] * DateTimes use Ruby's default calendar reform setting. #10201 [Geoff Buesing] diff --git a/activerecord/lib/active_record/timestamp.rb b/activerecord/lib/active_record/timestamp.rb index ee3e426512..84ae3785a2 100644 --- a/activerecord/lib/active_record/timestamp.rb +++ b/activerecord/lib/active_record/timestamp.rb @@ -12,7 +12,7 @@ module ActiveRecord base.alias_method_chain :create, :timestamps base.alias_method_chain :update, :timestamps - base.cattr_accessor :record_timestamps, :instance_writer => false + base.class_inheritable_accessor :record_timestamps, :instance_writer => false base.record_timestamps = true end -- cgit v1.2.3