Sha256: 9b061d83ff0885b3b6a6a1e34867edd48a871ca2670feda3d425d7200bcadd8a

Contents?: true

Size: 171 Bytes

Versions: 87

Compression:

Stored size: 171 Bytes

Contents

module Effective
  class SoldOutValidator < ActiveModel::Validator
    def validate(record)
      record.errors[:base] << "sold out" if record.sold_out?
    end
  end
end

Version data entries

87 entries across 87 versions & 1 rubygems

Version Path
effective_orders-2.2.3 app/models/validators/effective/sold_out_validator.rb
effective_orders-2.2.2 app/models/validators/effective/sold_out_validator.rb
effective_orders-2.2.1 app/models/validators/effective/sold_out_validator.rb
effective_orders-2.2.0 app/models/validators/effective/sold_out_validator.rb
effective_orders-2.1.17 app/models/validators/effective/sold_out_validator.rb
effective_orders-2.1.16 app/models/validators/effective/sold_out_validator.rb
effective_orders-2.1.15 app/models/validators/effective/sold_out_validator.rb
effective_orders-2.1.14 app/models/validators/effective/sold_out_validator.rb
effective_orders-2.1.13 app/models/validators/effective/sold_out_validator.rb
effective_orders-2.1.12 app/models/validators/effective/sold_out_validator.rb
effective_orders-2.1.10 app/models/validators/effective/sold_out_validator.rb
effective_orders-2.1.9 app/models/validators/effective/sold_out_validator.rb
effective_orders-2.1.8 app/models/validators/effective/sold_out_validator.rb
effective_orders-2.1.7 app/models/validators/effective/sold_out_validator.rb
effective_orders-2.1.6 app/models/validators/effective/sold_out_validator.rb
effective_orders-2.1.5 app/models/validators/effective/sold_out_validator.rb
effective_orders-2.1.4 app/models/validators/effective/sold_out_validator.rb
effective_orders-2.1.3 app/models/validators/effective/sold_out_validator.rb
effective_orders-2.1.2 app/models/validators/effective/sold_out_validator.rb
effective_orders-2.1.1 app/models/validators/effective/sold_out_validator.rb