mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Support lowerCamel key format
This commit is contained in:
11
test/fixtures/poro.rb
vendored
11
test/fixtures/poro.rb
vendored
@@ -35,6 +35,9 @@ end
|
||||
class Comment < Model
|
||||
end
|
||||
|
||||
class Blog < Model
|
||||
end
|
||||
|
||||
###
|
||||
## Serializers
|
||||
###
|
||||
@@ -62,3 +65,11 @@ end
|
||||
class CommentSerializer < ActiveModel::Serializer
|
||||
attributes :content
|
||||
end
|
||||
|
||||
class BlogSerializer < ActiveModel::Serializer
|
||||
attributes :name, :display_name
|
||||
end
|
||||
|
||||
class BlogLowerCamelSerializer < BlogSerializer
|
||||
format_keys :lower_camel
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user