mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-23 06:16:50 +00:00
Merge pull request #2106 from jeffrey008/patch-1
FIx the backticks [ci skip]
This commit is contained in:
commit
ac3a23f0ca
@ -251,11 +251,11 @@ BlogSerializer.new(object, key_format: :lower_camel)
|
||||
|
||||
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
|
||||
````
|
||||
```
|
||||
|
||||
This will build association keys like `comments` or `author` instead of `comment_ids` or `author_id`.
|
||||
|
||||
@ -932,7 +932,7 @@ now generates:
|
||||
class PostSerializer < ApplicationSerializer
|
||||
attributes :id
|
||||
end
|
||||
````
|
||||
```
|
||||
|
||||
# Design and Implementation Guidelines
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user