aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models
diff options
context:
space:
mode:
authorRaimonds Simanovskis <raimonds.simanovskis@gmail.com>2010-09-10 00:13:14 +0300
committerwycats <wycats@gmail.com>2010-09-09 18:27:53 -0700
commitaf2a011df2a29520ed55216c32dfb84b9f018b38 (patch)
tree49573f97a1f6f5ba3dc169d8140495512df5bb6d /activerecord/test/models
parent7fae0aa4ac116bcbf522a9a4f19972c653d366fa (diff)
downloadrails-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/test/models')
-rw-r--r--activerecord/test/models/subject.rb10
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