aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/topic.rb
diff options
context:
space:
mode:
authorwycats <wycats@gmail.com>2010-06-07 23:03:59 -0400
committerwycats <wycats@gmail.com>2010-06-07 23:03:59 -0400
commitb97a3f33a36f936531e608343797b99268f8bd92 (patch)
tree94abb825948b826fefdfd8952c25a9f3f3690772 /activerecord/test/models/topic.rb
parent0042f4166f783085eb909d69d542b5323d8af5d6 (diff)
parentacef8feafa8a44271eb28685e180f8c28b7e4a0f (diff)
downloadrails-b97a3f33a36f936531e608343797b99268f8bd92.tar.gz
rails-b97a3f33a36f936531e608343797b99268f8bd92.tar.bz2
rails-b97a3f33a36f936531e608343797b99268f8bd92.zip
Merge remote branch 'rsim/oracle_enhanced_rails3'
Diffstat (limited to 'activerecord/test/models/topic.rb')
-rw-r--r--activerecord/test/models/topic.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/test/models/topic.rb b/activerecord/test/models/topic.rb
index 91fc7c9416..617f01b47d 100644
--- a/activerecord/test/models/topic.rb
+++ b/activerecord/test/models/topic.rb
@@ -43,6 +43,12 @@ class Topic < ActiveRecord::Base
before_create :default_written_on
before_destroy :destroy_children
+ # Explicitly define as :date column so that returned Oracle DATE values would be typecasted to Date and not Time.
+ # Some tests depend on assumption that this attribute will have Date values.
+ if current_adapter?(:OracleEnhancedAdapter)
+ set_date_columns :last_read
+ end
+
def parent
Topic.find(parent_id)
end