We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a52189c commit 43b6baeCopy full SHA for 43b6bae
docs/general/serializers.md
@@ -31,7 +31,7 @@ Serialization of the resource `title`
31
|---------------------------- |-------------|
32
| `attribute :title` | `{ title: 'Some Title' } `
33
| `attribute :title, key: :name` | `{ name: 'Some Title' } `
34
-| `attribute :title { 'A Different Title'}` | `{ title: 'A Different Title' } `
+| `attribute(:title) { 'A Different Title'}` | `{ title: 'A Different Title' } `
35
| `attribute :title`<br>`def title 'A Different Title' end` | `{ title: 'A Different Title' }`
36
37
An `if` or `unless` option can make an attribute conditional. It takes a symbol of a method name on the serializer, or a lambda literal.
0 commit comments