mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-22 22:06:50 +00:00
Update serializers.md
This commit is contained in:
parent
6fbf59fdd0
commit
19f8ada4af
@ -225,10 +225,10 @@ With the `:json` adapter, the previous serializer would be rendered as:
|
|||||||
link :self do
|
link :self do
|
||||||
href "https://example.com/link_author/#{object.id}"
|
href "https://example.com/link_author/#{object.id}"
|
||||||
end
|
end
|
||||||
link :author { link_author_url(object) }
|
link(:author) { link_author_url(object) }
|
||||||
link :link_authors { link_authors_url }
|
link(:link_authors) { link_authors_url }
|
||||||
link :other, 'https://example.com/resource'
|
link :other, 'https://example.com/resource'
|
||||||
link :posts { link_author_posts_url(object) }
|
link(:posts) { link_author_posts_url(object) }
|
||||||
```
|
```
|
||||||
|
|
||||||
#### #object
|
#### #object
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user