Skip to content
This repository
Browse code

added Subject#after_initialize to be the same as Topic#after_initialize

  • Loading branch information...
commit 090ec47bec21261ea867fbca686bba132f01834d 1 parent 01a4e07
Raimonds Simanovskis authored March 23, 2009

Showing 1 changed file with 9 additions and 1 deletion. Show diff stats Hide diff stats

  1. 10  activerecord/test/models/subject.rb
10  activerecord/test/models/subject.rb
... ...
@@ -1,4 +1,12 @@
1  
-# used for OracleSynonymTest, see test/synonym_test_oci.rb
  1
+# used for OracleSynonymTest, see test/synonym_test_oracle.rb
2 2
 #
3 3
 class Subject < ActiveRecord::Base
  4
+  protected
  5
+    # added initialization of author_email_address in the same way as in Topic class
  6
+    # as otherwise synonym test was failing
  7
+    def after_initialize
  8
+      if self.new_record?
  9
+        self.author_email_address = 'test@test.com'
  10
+      end
  11
+    end
4 12
 end

0 notes on commit 090ec47

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