mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-24 23:06:50 +00:00
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 ```
This commit is contained in:
parent
eb865c276d
commit
bcf21ea0a6
@ -47,8 +47,7 @@ module ActiveModel
|
|||||||
# 4. key may be nil for empty collection and no serializer option
|
# 4. key may be nil for empty collection and no serializer option
|
||||||
key &&= key.pluralize
|
key &&= key.pluralize
|
||||||
# 5. fail if the key cannot be determined
|
# 5. fail if the key cannot be determined
|
||||||
key || fail(ArgumentError, 'Cannot infer root key from collection type. Please
|
key || fail(ArgumentError, 'Cannot infer root key from collection type. Please specify the root or each_serializer option, or render a JSON String')
|
||||||
specify the root or each_serializer option, or render a JSON String')
|
|
||||||
end
|
end
|
||||||
# rubocop:enable Metrics/CyclomaticComplexity
|
# rubocop:enable Metrics/CyclomaticComplexity
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user