Sha256: f842f935e57c7f08154275fc673bd7210d5b293145673b23cbe908c129675f41

Contents?: true

Size: 171 Bytes

Versions: 236

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

236 entries across 236 versions & 1 rubygems

Version Path
effective_orders-3.0.3 app/models/validators/effective/sold_out_validator.rb
effective_orders-3.0.2 app/models/validators/effective/sold_out_validator.rb
effective_orders-4.1.4 app/models/validators/effective/sold_out_validator.rb
effective_orders-4.1.3 app/models/validators/effective/sold_out_validator.rb
effective_orders-4.1.2 app/models/validators/effective/sold_out_validator.rb
effective_orders-4.1.1 app/models/validators/effective/sold_out_validator.rb
effective_orders-4.1.0 app/models/validators/effective/sold_out_validator.rb
effective_orders-4.0.6 app/models/validators/effective/sold_out_validator.rb
effective_orders-4.0.5 app/models/validators/effective/sold_out_validator.rb
effective_orders-4.0.4 app/models/validators/effective/sold_out_validator.rb
effective_orders-4.0.3 app/models/validators/effective/sold_out_validator.rb
effective_orders-4.0.2 app/models/validators/effective/sold_out_validator.rb
effective_orders-4.0.1 app/models/validators/effective/sold_out_validator.rb
effective_orders-4.0.0 app/models/validators/effective/sold_out_validator.rb
effective_orders-4.0.0beta19 app/models/validators/effective/sold_out_validator.rb
effective_orders-4.0.0beta18 app/models/validators/effective/sold_out_validator.rb
effective_orders-4.0.0beta17 app/models/validators/effective/sold_out_validator.rb
effective_orders-4.0.0beta16 app/models/validators/effective/sold_out_validator.rb
effective_orders-4.0.0beta15 app/models/validators/effective/sold_out_validator.rb
effective_orders-4.0.0beta14 app/models/validators/effective/sold_out_validator.rb