active_model_serializers/test
Noah Silas 7bde7bf752 Handle conflicts between key names and serializer methods
As an example, all serializers implement `#object` as a reference to the
object being esrialized, but this was preventing adding a key to the
serialized representation with the `object` name.

Instead of having attributes directly map to methods on the serializer,
we introduce one layer of abstraction: the `_attributes_map`. This hash
maps the key names expected in the output to the names of the
implementing methods.

This simplifies some things (removing the need to maintain both
`_attributes` and `_attribute_keys`), but does add some complexity in
order to support overriding attributes by defining methods on the
serializer. It seems that with the addition of the inline-block format,
we may want to remove the usage of programatically defining methods on
the serializer for this kind of customization.
2015-12-02 17:20:22 -06:00
..
action_controller Rails5 requires x_action 2015-11-25 22:06:20 -06:00
active_model_serializers Fix typo 2015-11-24 07:22:59 -08:00
adapter Move caching initialization to Railtie 2015-11-25 21:56:01 -06:00
fixtures ActiveModel::AttributeAssignment requires Model#respond_to_missing? 2015-11-25 21:56:01 -06:00
generators Remove space in {} 2015-09-03 20:55:40 -05:00
include_tree Add test and bugfix to include an array of string 2015-11-06 17:23:25 +01:00
serializers Handle conflicts between key names and serializer methods 2015-12-02 17:20:22 -06:00
support Test keyword args in requests for Rails 5; fallback for earlier versions 2015-11-25 21:56:02 -06:00
active_record_test.rb Add lint tests for AR models. 2015-09-07 18:34:42 +02:00
adapter_test.rb Introduce Adapter::Base 2015-09-20 12:26:04 -05:00
array_serializer_test.rb Test ArraySerializer less rigorously on Minitest 4 2015-11-08 23:12:56 -06:00
capture_warnings.rb Add more warnings ignore directories 2015-11-25 21:49:23 -06:00
collection_serializer_test.rb Rename ArraySerializer to CollectionSerializer for clarity 2015-10-21 16:53:26 -05:00
lint_test.rb Add PORO serializable base class: ActiveModelSerializers::Model 2015-10-14 21:33:02 -05:00
logger_test.rb Use null logger in test; keep track of original logger 2015-11-10 03:09:24 -06:00
poro_test.rb Lead by example: lint PORO model 2015-08-18 12:59:12 -04:00
serializable_resource_test.rb Encapsulate serialization in ActiveModel::SerializableResource 2015-07-23 11:05:23 -05:00
test_helper.rb Test keyword args in requests for Rails 5; fallback for earlier versions 2015-11-25 21:56:02 -06:00