Skip to content

Commit bcf21ea

Browse files
authored
Remove unnecessary line break from exception message
This removes the unnecessary line break from the exception message. Example: ``` Cannot infer root key from collection type. Please\n specify the root or each_serializer option, or render a JSON String ```
1 parent eb865c2 commit bcf21ea

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/active_model/serializer/collection_serializer.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ def json_key
4747
# 4. key may be nil for empty collection and no serializer option
4848
key &&= key.pluralize
4949
# 5. fail if the key cannot be determined
50-
key || fail(ArgumentError, 'Cannot infer root key from collection type. Please
51-
specify the root or each_serializer option, or render a JSON String')
50+
key || fail(ArgumentError, 'Cannot infer root key from collection type. Please specify the root or each_serializer option, or render a JSON String')
5251
end
5352
# rubocop:enable Metrics/CyclomaticComplexity
5453

0 commit comments

Comments
 (0)