mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-22 22:06:50 +00:00
FIx the backticks
The backticks are wrong, and making the remaining part of doc inside code block. Just a simple fix to the README.
This commit is contained in:
parent
c54532a2ae
commit
29166b26b2
@ -234,7 +234,7 @@ end
|
||||
|
||||
You can specify that serializers use the lower-camel key format at the config, class or instance level.
|
||||
|
||||
```ruby
|
||||
````ruby
|
||||
|
||||
ActiveModel::Serializer.setup do |config|
|
||||
config.key_format = :lower_camel
|
||||
@ -245,13 +245,13 @@ class BlogLowerCamelSerializer < ActiveModel::Serializer
|
||||
end
|
||||
|
||||
BlogSerializer.new(object, key_format: :lower_camel)
|
||||
```
|
||||
````
|
||||
|
||||
## Changing the default association key type
|
||||
|
||||
You can specify that serializers use unsuffixed names as association keys by default.
|
||||
|
||||
`````ruby
|
||||
````ruby
|
||||
ActiveModel::Serializer.setup do |config|
|
||||
config.default_key_type = :name
|
||||
end
|
||||
|
||||
Loading…
Reference in New Issue
Block a user