mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-24 23:06:50 +00:00
Fixing README at 0.9.0 and removing reference to attribute method #657
This commit is contained in:
parent
89f87bf855
commit
6fb6162622
@ -257,7 +257,7 @@ ActiveModel::Serializer.setup do |config|
|
|||||||
end
|
end
|
||||||
````
|
````
|
||||||
|
|
||||||
This will build association keys like `comments` or `author` instead of `comment_ids` or `author_id`.
|
This will build association keys like `comments` or `author` instead of `comment_ids` or `author_id`.
|
||||||
|
|
||||||
## Getting the old version
|
## Getting the old version
|
||||||
|
|
||||||
@ -304,7 +304,7 @@ Since this shadows any attribute named `object`, you can include them through `o
|
|||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
class VersionSerializer < ActiveModel::Serializer
|
class VersionSerializer < ActiveModel::Serializer
|
||||||
attribute :version_object, key: :object
|
attributes :version_object
|
||||||
|
|
||||||
def version_object
|
def version_object
|
||||||
object.object
|
object.object
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user