Skip to content

Commit 019bcbf

Browse files
committed
fix missing type specification in docs, ref #886
[ci skip]
1 parent 9dcd94a commit 019bcbf

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -754,10 +754,10 @@ You can define validations and coercion options for your parameters using a `par
754754
params do
755755
requires :id, type: Integer
756756
optional :text, type: String, regexp: /\A[a-z]+\z/
757-
group :media do
757+
group :media, type: Hash do
758758
requires :url
759759
end
760-
optional :audio do
760+
optional :audio, type: Hash do
761761
requires :format, type: Symbol, values: [:mp3, :wav, :aac, :ogg], default: :mp3
762762
end
763763
mutually_exclusive :media, :audio
@@ -1257,24 +1257,24 @@ All of these methods can be used at any nested level.
12571257

12581258
```ruby
12591259
params do
1260-
requires :food do
1260+
requires :food, type: Hash do
12611261
optional :meat
12621262
optional :fish
12631263
optional :rice
12641264
at_least_one_of :meat, :fish, :rice
12651265
end
1266-
group :drink do
1266+
group :drink, type: Hash do
12671267
optional :beer
12681268
optional :wine
12691269
optional :juice
12701270
exactly_one_of :beer, :wine, :juice
12711271
end
1272-
optional :dessert do
1272+
optional :dessert, type: Hash do
12731273
optional :cake
12741274
optional :icecream
12751275
mutually_exclusive :cake, :icecream
12761276
end
1277-
optional :recipe do
1277+
optional :recipe, type: Hash do
12781278
optional :oil
12791279
optional :meat
12801280
all_or_none_of :oil, :meat

0 commit comments

Comments
 (0)