diff options
author | Raimonds Simanovskis <raimonds.simanovskis@gmail.com> | 2010-09-10 00:13:14 +0300 |
---|---|---|
committer | wycats <wycats@gmail.com> | 2010-09-09 18:27:53 -0700 |
commit | af2a011df2a29520ed55216c32dfb84b9f018b38 (patch) | |
tree | 49573f97a1f6f5ba3dc169d8140495512df5bb6d /activerecord | |
parent | 7fae0aa4ac116bcbf522a9a4f19972c653d366fa (diff) | |
download | rails-af2a011df2a29520ed55216c32dfb84b9f018b38.tar.gz rails-af2a011df2a29520ed55216c32dfb84b9f018b38.tar.bz2 rails-af2a011df2a29520ed55216c32dfb84b9f018b38.zip |
fixed Subject model after_initialize callback for test_oracle_synonym test
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/test/models/subject.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/activerecord/test/models/subject.rb b/activerecord/test/models/subject.rb index 1b9d8107f8..d4b8b91de8 100644 --- a/activerecord/test/models/subject.rb +++ b/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 |