Skip to content

Commit 43b6bae

Browse files
author
Scott Kobewka
committed
Fixing typo in Serializers guide for including a block after
1 parent a52189c commit 43b6bae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/general/serializers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Serialization of the resource `title`
3131
|---------------------------- |-------------|
3232
| `attribute :title` | `{ title: 'Some Title' } `
3333
| `attribute :title, key: :name` | `{ name: 'Some Title' } `
34-
| `attribute :title { 'A Different Title'}` | `{ title: 'A Different Title' } `
34+
| `attribute(:title) { 'A Different Title'}` | `{ title: 'A Different Title' } `
3535
| `attribute :title`<br>`def title 'A Different Title' end` | `{ title: 'A Different Title' }`
3636

3737
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

Comments
 (0)