Skip to content

Commit 85a27bc

Browse files
author
Robert Mosolgo
committed
Merge pull request #145 from uberllama/master
README update
2 parents 579a91a + c0ecca9 commit 85a27bc

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -165,11 +165,9 @@ which generates JSON like this:
165165
This is not suitable for ReactJS props, which is expected to be a key-value object. You will need to wrap your index.json.jbuilder node with a root node, like so:
166166

167167
```ruby
168-
json.messages do |json|
169-
json.array!(@messages) do |message|
170-
json.extract! message, :id, :name
171-
json.url message_url(message, format: :json)
172-
end
168+
json.messages(@messages) do |message|
169+
json.extract! message, :id, :name
170+
json.url message_url(message, format: :json)
173171
end
174172
```
175173

0 commit comments

Comments
 (0)