mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-23 06:16:50 +00:00
README: typo fix on attributes
This commit is contained in:
parent
0c13956311
commit
f02f5b767a
@ -31,7 +31,7 @@ serializers:
|
|||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
class PostSerializer < ActiveModel::Serializer
|
class PostSerializer < ActiveModel::Serializer
|
||||||
attribute :title, :body
|
attributes :title, :body
|
||||||
|
|
||||||
has_many :comments
|
has_many :comments
|
||||||
|
|
||||||
@ -43,7 +43,7 @@ and
|
|||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
class CommentSerializer < ActiveModel::Serializer
|
class CommentSerializer < ActiveModel::Serializer
|
||||||
attribute :name, :body
|
attributes :name, :body
|
||||||
|
|
||||||
belongs_to :post
|
belongs_to :post
|
||||||
|
|
||||||
@ -115,7 +115,7 @@ The generated seralizer will contain basic `attributes` and
|
|||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
class PostSerializer < ActiveModel::Serializer
|
class PostSerializer < ActiveModel::Serializer
|
||||||
attribute :title, :body
|
attributes :title, :body
|
||||||
|
|
||||||
has_many :comments
|
has_many :comments
|
||||||
|
|
||||||
@ -127,7 +127,7 @@ and
|
|||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
class CommentSerializer < ActiveModel::Serializer
|
class CommentSerializer < ActiveModel::Serializer
|
||||||
attribute :name, :body
|
attributes :name, :body
|
||||||
|
|
||||||
belongs_to :post_id
|
belongs_to :post_id
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user