Skip to content
Browse files

fixed Subject model after_initialize callback for test_oracle_synonym…

… test
  • Loading branch information...
1 parent 7fae0aa commit af2a011df2a29520ed55216c32dfb84b9f018b38 @rsim rsim committed with wycats Sep 10, 2010
Showing with 7 additions and 3 deletions.
  1. +7 −3 activerecord/test/models/subject.rb
View
10 activerecord/test/models/subject.rb
@@ -1,12 +1,16 @@
# used for OracleSynonymTest, see test/synonym_test_oracle.rb
#
class Subject < ActiveRecord::Base
+
+ # added initialization of author_email_address in the same way as in Topic class
+ # as otherwise synonym test was failing
+ after_initialize :set_email_address
+
protected
- # added initialization of author_email_address in the same way as in Topic class
- # as otherwise synonym test was failing
- def after_initialize
+ def set_email_address
if self.new_record?
self.author_email_address = 'test@test.com'
end
end
+
end

0 comments on commit af2a011

Please sign in to comment.
Something went wrong with that request. Please try again.