Skip to content

Commit

Permalink
new dry-v syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
vasspilka committed Jun 12, 2016
1 parent d3c2f6f commit 02941d9
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions test/fixtures.rb
Original file line number Diff line number Diff line change
Expand Up @@ -339,10 +339,12 @@ def initialize(attributes = {})
end

class DeliveryParams < Hanami::Action::Params
param :delivery do
param :customer_id, type: Integer, presence: true
param :address do
param :street, type: String, presence: true
params do
required(:delivery).schema do
required(:customer_id).filled(:int?)
required(:address).schema do
required(:street).filled(:str?)
end
end
end
end
Expand Down

0 comments on commit 02941d9

Please sign in to comment.