aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/fixtures/topic.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/fixtures/topic.rb')
-rwxr-xr-xactiverecord/test/fixtures/topic.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/activerecord/test/fixtures/topic.rb b/activerecord/test/fixtures/topic.rb
index dd71d6bf2b..b2541c8640 100755
--- a/activerecord/test/fixtures/topic.rb
+++ b/activerecord/test/fixtures/topic.rb
@@ -28,4 +28,10 @@ class Topic < ActiveRecord::Base
def destroy_children
self.class.delete_all "parent_id = #{id}"
end
-end
+
+ def after_initialize
+ if self.new_record?
+ self.author_email_address = 'test@test.com'
+ end
+ end
+end \ No newline at end of file