active_model_serializers/test
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
..
action_controller Don't pluralize the CollectionSerializer#root for #json_key 2016-01-12 09:32:43 -08:00
active_model_serializers Favor ActiveSupport::TestCase over Minitest::Test 2015-12-22 10:35:51 -06:00
adapter Favor ActiveSupport::TestCase over Minitest::Test 2015-12-22 10:35:51 -06:00
fixtures Consider evaluating association in serializer context 2015-12-29 22:16:42 -06:00
generators Remove space in {} 2015-09-03 20:55:40 -05:00
include_tree Favor ActiveSupport::TestCase over Minitest::Test 2015-12-22 10:35:51 -06:00
serializers Tidy up the tests 2016-01-07 11:21:19 -08:00
support Merge pull request #1371 from bf4/documentation_updates 2015-12-20 22:30:44 -06:00
active_record_test.rb Favor ActiveSupport::TestCase over Minitest::Test 2015-12-22 10:35:51 -06:00
adapter_test.rb Favor ActiveSupport::TestCase over Minitest::Test 2015-12-22 10:35:51 -06:00
array_serializer_test.rb Tidy up the tests 2016-01-07 11:21:19 -08:00
capture_warnings.rb Add more warnings ignore directories 2015-11-25 21:49:23 -06:00
collection_serializer_test.rb Don't pluralize the CollectionSerializer#root for #json_key 2016-01-12 09:32:43 -08:00
grape_test.rb Favor ActiveSupport::TestCase over Minitest::Test 2015-12-22 10:35:51 -06:00
lint_test.rb Favor ActiveSupport::TestCase over Minitest::Test 2015-12-22 10:35:51 -06:00
logger_test.rb Favor ActiveSupport::TestCase over Minitest::Test 2015-12-22 10:35:51 -06:00
poro_test.rb Favor ActiveSupport::TestCase over Minitest::Test 2015-12-22 10:35:51 -06:00
serializable_resource_test.rb Favor ActiveSupport::TestCase over Minitest::Test 2015-12-22 10:35:51 -06:00
test_helper.rb Test keyword args in requests for Rails 5; fallback for earlier versions 2015-11-25 21:56:02 -06:00