aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/test/cases/serializers/json_serialization_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* replacing ordered hash to ruby hashprasath2012-02-081-2/+2
|
* Revert "Implement ArraySerializer and move old serialization API to a new ↵José Valim2011-11-301-0/+221
| | | | | | | | | | | | | namespace." This reverts commit 8896b4fdc8a543157cdf4dfc378607ebf6c10ab0. Conflicts: activemodel/lib/active_model.rb activemodel/lib/active_model/serializable.rb activemodel/lib/active_model/serializer.rb activemodel/test/cases/serializer_test.rb
* Implement ArraySerializer and move old serialization API to a new namespace.José Valim2011-11-231-219/+0
| | | | | | | | | | | | | 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.
* Fixing `as_json` method for ActiveRecord models.Nicolás Hock Isaza2011-09-291-0/+10
| | | | | | | | | | | | | When you've got an AR Model and you override the `as_json` method, you should be able to add default options to the renderer, like this: class User < ActiveRecord::Base def as_json(options = {}) super(options.merge(:except => [:password_digest])) end end This was not possible before this commit. See the added test case.
* fixed a bug with the json serialization when the class setting is set to not ↵Matt Aimonetti2011-09-221-0/+10
| | | | include the root, but an instance is serialized with the root option passed as true
* Enable passing root: false to #to_jsonJoe Fiorini2011-07-011-1/+52
|
* Rename test directory to match code directoryJohn Firebaugh2011-04-061-0/+148
Hopefully "serializeration" is not an in joke that I missed.