Skip to content

Commit

Permalink
Removes incorrect documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
wolovim committed Jan 14, 2016
1 parent 2c73967 commit f56b3be
Showing 1 changed file with 1 addition and 26 deletions.
27 changes: 1 addition & 26 deletions docs/general/serializers.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ end

### Polymorphic Relationships

As of release `0.10`, polymorphic relationships are serialized just by specifying the relationship. For example:
Polymorphic relationships are serialized just by specifying the relationship. For example:

```ruby
class PictureSerializer < ActiveModel::Serializer
Expand All @@ -98,31 +98,6 @@ If the instance of `Picture` belongs to a `Product`, an example payload might be
}
```

In prior releases (and optionally in `0.10`), a `polymorphic: true` parameter is required:

```ruby
class PictureSerializer < ActiveModel::Serializer
has_one :imageable, polymorphic: true
end
```

In this case, an example payload might be:

```javascript
{
picture: {
id: 1,
imageable: {
type: "product",
product: {
id: 3,
title: "Product 3"
}
}
}
}
```

### Caching

#### ::cache
Expand Down

0 comments on commit f56b3be

Please sign in to comment.