Sha256: e2353eba0f665f8e8fd647bdb303666db55c9e9168cadbffe38f23ebd8437dba

Contents?: true

Size: 350 Bytes

Versions: 2

Compression:

Stored size: 350 Bytes

Contents

class Response < Struct.new(:how_many_people, :how_many_pies)
  #extend  ActiveModel::Naming
  #include ActiveModel::Conversion
  include ActiveModel::Validations

  validates :how_many_people, greater_than: { value: 1, operator: :>= }, allow_blank: true
  validates :how_many_pies,   at_least:     { value: 1 },                allow_blank: true
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
activemodel-validators-1.1.0 spec/support/models/response.rb
activemodel-validators-1.0.0 spec/support/models/response.rb