aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/fixtures
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/fixtures')
-rwxr-xr-xactiverecord/test/fixtures/topic.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/test/fixtures/topic.rb b/activerecord/test/fixtures/topic.rb
index d7cd52e33e..dd71d6bf2b 100755
--- a/activerecord/test/fixtures/topic.rb
+++ b/activerecord/test/fixtures/topic.rb
@@ -13,8 +13,14 @@ class Topic < ActiveRecord::Base
def topic_id
id
end
+
protected
+ def approved=(val)
+ @custom_approved = val
+ write_attribute(:approved, val)
+ end
+
def default_written_on
self.written_on = Time.now unless attribute_present?("written_on")
end