aboutsummaryrefslogtreecommitdiffstats
path: root/railties/configs
diff options
context:
space:
mode:
authorRodrigo Kochenburger <divoxx@gmail.com>2008-04-11 12:35:09 -0300
committerrick <technoweenie@gmail.com>2008-05-13 15:04:11 -0700
commitbca8751e40a5594c4de2ca58e089b8d98e44632b (patch)
tree34a89b57cdf2ac2092c103975eeb2fa0f51c03e8 /railties/configs
parent2d372d704987e05712ccd937e78d8dbd41242efe (diff)
downloadrails-bca8751e40a5594c4de2ca58e089b8d98e44632b.tar.gz
rails-bca8751e40a5594c4de2ca58e089b8d98e44632b.tar.bz2
rails-bca8751e40a5594c4de2ca58e089b8d98e44632b.zip
Add ActiveRecord option to store the full class name on STI's type column, allowing one to have STI subclasses in different namespaces [#114]
Signed-off-by: rick <technoweenie@gmail.com>
Diffstat (limited to 'railties/configs')
-rw-r--r--railties/configs/initializers/new_rails_defaults.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/railties/configs/initializers/new_rails_defaults.rb b/railties/configs/initializers/new_rails_defaults.rb
index 3a617e3ae3..b8f0e2cac2 100644
--- a/railties/configs/initializers/new_rails_defaults.rb
+++ b/railties/configs/initializers/new_rails_defaults.rb
@@ -7,6 +7,9 @@ ActiveRecord::Base.partial_updates = true
# Include ActiveRecord class name as root for JSON serialized output.
ActiveRecord::Base.include_root_in_json = true
+# Store the full class name (including module namespace) in STI type column
+ActiveRecord::Base.store_full_sti_class = true
+
# Use ISO 8601 format for JSON serialized times and dates
ActiveSupport.use_standard_json_time_format = true