Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
dhh authored Nov 14, 2021
1 parent 1d64c43 commit b94394b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,13 @@ json.array! @people, :id, :name

To make a plain array without keys, construct and pass in a standard Ruby array.

``` ruby
```ruby
my_array = %w(David Jamie)

json.people my_array

# => "people": [ "David", "Jamie" ]
```

You don't always have or need a collection when building an array.

Expand Down

0 comments on commit b94394b

Please sign in to comment.