mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-22 22:06:50 +00:00
When the resource is a zero result query,
i.e. post_comments = PostComment.where("1=0")
the json_key will become 'postcomments' rather than 'post_comments'.
Using 'underscore' instead of 'downcase' fixes the error.
|
||
|---|---|---|
| .. | ||
| adapter | ||
| adapter.rb | ||
| array_serializer.rb | ||
| configuration.rb | ||
| fieldset.rb | ||
| lint.rb | ||
| railtie.rb | ||
| version.rb | ||