aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2011-11-23 23:18:13 +0000
committerJosé Valim <jose.valim@gmail.com>2011-11-23 23:18:15 +0000
commit8896b4fdc8a543157cdf4dfc378607ebf6c10ab0 (patch)
tree5deca0d54d2c103d0a9e6167a756d638fc25e9ec /activemodel/lib/active_model.rb
parent0536ea8c7855222111fad6df71d0d09b77ea4317 (diff)
downloadrails-8896b4fdc8a543157cdf4dfc378607ebf6c10ab0.tar.gz
rails-8896b4fdc8a543157cdf4dfc378607ebf6c10ab0.tar.bz2
rails-8896b4fdc8a543157cdf4dfc378607ebf6c10ab0.zip
Implement ArraySerializer and move old serialization API to a new namespace.
The following constants were renamed: ActiveModel::Serialization => ActiveModel::Serializable ActiveModel::Serializers::JSON => ActiveModel::Serializable::JSON ActiveModel::Serializers::Xml => ActiveModel::Serializable::XML The main motivation for such a change is that `ActiveModel::Serializers::JSON` was not actually a serializer, but a module that when included allows the target to be serializable to JSON. With such changes, we were able to clean up the namespace to add true serializers as the ArraySerializer.
Diffstat (limited to 'activemodel/lib/active_model.rb')
-rw-r--r--activemodel/lib/active_model.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/activemodel/lib/active_model.rb b/activemodel/lib/active_model.rb
index 28765b00bb..6c4fb44b0f 100644
--- a/activemodel/lib/active_model.rb
+++ b/activemodel/lib/active_model.rb
@@ -29,6 +29,7 @@ require 'active_model/version'
module ActiveModel
extend ActiveSupport::Autoload
+ autoload :ArraySerializer, 'active_model/serializer'
autoload :AttributeMethods
autoload :BlockValidator, 'active_model/validator'
autoload :Callbacks
@@ -43,8 +44,9 @@ module ActiveModel
autoload :Observer, 'active_model/observing'
autoload :Observing
autoload :SecurePassword
- autoload :Serializer
+ autoload :Serializable
autoload :Serialization
+ autoload :Serializer
autoload :TestCase
autoload :Translation
autoload :Validations