From 019bcbfc3ac5e94d227f76b93e415c1bab752ca7 Mon Sep 17 00:00:00 2001 From: namusyaka Date: Tue, 21 Mar 2017 14:14:37 +0900 Subject: [PATCH] fix missing type specification in docs, ref #886 [ci skip] --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 0fdd2fd610..593ae443b8 100644 --- a/README.md +++ b/README.md @@ -754,10 +754,10 @@ You can define validations and coercion options for your parameters using a `par params do requires :id, type: Integer optional :text, type: String, regexp: /\A[a-z]+\z/ - group :media do + group :media, type: Hash do requires :url end - optional :audio do + optional :audio, type: Hash do requires :format, type: Symbol, values: [:mp3, :wav, :aac, :ogg], default: :mp3 end mutually_exclusive :media, :audio @@ -1257,24 +1257,24 @@ All of these methods can be used at any nested level. ```ruby params do - requires :food do + requires :food, type: Hash do optional :meat optional :fish optional :rice at_least_one_of :meat, :fish, :rice end - group :drink do + group :drink, type: Hash do optional :beer optional :wine optional :juice exactly_one_of :beer, :wine, :juice end - optional :dessert do + optional :dessert, type: Hash do optional :cake optional :icecream mutually_exclusive :cake, :icecream end - optional :recipe do + optional :recipe, type: Hash do optional :oil optional :meat all_or_none_of :oil, :meat