active_model_serializers/test/action_controller
Ben Woosley 251e33a0a1 Don't pluralize the CollectionSerializer#root for #json_key
One of three constituents is used to provide the
CollectionSerializer's #json_key:

1) the :root option - controlled by the caller
2) the #name of the first resource serializer - the root or
   underscored model name
3) the underscored #name of the resources object - generally
   equivalent to the underscored model name of #2

Of the three, only the latter 2 are out of the callers control, and
only the latter two are expected to be singular by default. Not
pluralizing the root gives the caller additional flexibility in
defining the desired root, whether conventionally plural,
unconventionally plural (e.g. objects_received:) or singular.
2016-01-12 09:32:43 -08:00
..
json Refactors of the Attribute adapter. Adds support for nested associations specified from the include key in the controller. Adds some tests and some method documentation 2015-09-21 10:35:47 -04:00
json_api Test keyword args in requests for Rails 5; fallback for earlier versions 2015-11-25 21:56:02 -06:00
adapter_selector_test.rb Add PORO serializable base class: ActiveModelSerializers::Model 2015-10-14 21:33:02 -05:00
explicit_serializer_test.rb Rubocop: Consistent spacing 2015-09-03 20:51:40 -05:00
serialization_scope_name_test.rb Rails5 requires x_action 2015-11-25 22:06:20 -06:00
serialization_test.rb Don't pluralize the CollectionSerializer#root for #json_key 2016-01-12 09:32:43 -08:00