active_model_serializers/lib/active_model/serializer
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
..
adapter [DOCS] Refactor, update, create documentation [ci skip] 2015-12-14 14:38:29 -06:00
adapter.rb Enforce Rails-style (line-count-based) block style 2015-09-21 00:00:53 -05:00
array_serializer.rb Test ArraySerializer less rigorously on Minitest 4 2015-11-08 23:12:56 -06:00
association.rb Rubocop: Consistent spacing 2015-09-03 20:51:40 -05:00
associations.rb Refactor Association/Reflection block value reading 2015-12-03 10:53:43 -06:00
attribute.rb Remove key from Attribute class. 2015-12-30 16:47:10 +01:00
attributes.rb Add ActiveSupport::Autoload extension to Attribute. 2015-12-30 17:44:19 +01:00
belongs_to_reflection.rb Associations refactoring 2015-07-30 11:20:29 +03:00
caching.rb Extract caching into its own module. 2015-12-28 02:53:49 +01:00
collection_reflection.rb Associations refactoring 2015-07-30 11:20:29 +03:00
collection_serializer.rb Don't pluralize the CollectionSerializer#root for #json_key 2016-01-12 09:32:43 -08:00
configuration.rb Add config.serializer_lookup_enabled that defaults true 2015-11-30 00:20:58 -06:00
fieldset.rb Initialize fieldset. 2015-10-25 19:56:43 +01:00
has_many_reflection.rb Associations refactoring 2015-07-30 11:20:29 +03:00
has_one_reflection.rb Associations refactoring 2015-07-30 11:20:29 +03:00
include_tree.rb Add test and bugfix to include an array of string 2015-11-06 17:23:25 +01:00
lint.rb Tidy up the tests 2016-01-07 11:21:19 -08:00
railtie.rb Move caching initialization to Railtie 2015-11-25 21:56:01 -06:00
reflection.rb Consider evaluating association in serializer context 2015-12-29 22:16:42 -06:00
singular_reflection.rb Associations refactoring 2015-07-30 11:20:29 +03:00
version.rb updating version to new release 2015-09-16 12:19:44 -03:00