Remove unrelated code from attribute override examples

This commit is contained in:
Nate Sullivan 2016-01-23 18:50:16 -08:00
parent 8981683b9f
commit da85d944d4

View File

@ -188,8 +188,6 @@ If you want to override any association, you can use:
```ruby ```ruby
class PostSerializer < ActiveModel::Serializer class PostSerializer < ActiveModel::Serializer
attributes :id, :body
has_many :comments has_many :comments
def comments def comments
@ -204,9 +202,7 @@ If you want to override any attribute, you can use:
```ruby ```ruby
class PostSerializer < ActiveModel::Serializer class PostSerializer < ActiveModel::Serializer
attributes :id, :body attributes :body
has_many :comments
def body def body
object.body.downcase object.body.downcase