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-6.14.2 app/models/effective/sold_out_validator.rb
effective_orders-6.14.1 app/models/effective/sold_out_validator.rb
effective_orders-6.14.0 app/models/effective/sold_out_validator.rb
effective_orders-6.13.3 app/models/effective/sold_out_validator.rb
effective_orders-6.13.2 app/models/effective/sold_out_validator.rb
effective_orders-6.13.1 app/models/effective/sold_out_validator.rb
effective_orders-6.13.0 app/models/effective/sold_out_validator.rb
effective_orders-6.12.4 app/models/effective/sold_out_validator.rb
effective_orders-6.12.3 app/models/effective/sold_out_validator.rb
effective_orders-6.12.2 app/models/effective/sold_out_validator.rb
effective_orders-6.12.1 app/models/effective/sold_out_validator.rb
effective_orders-6.12.0 app/models/effective/sold_out_validator.rb
effective_orders-6.9.10 app/models/effective/sold_out_validator.rb
effective_orders-6.9.9 app/models/effective/sold_out_validator.rb
effective_orders-6.9.8 app/models/effective/sold_out_validator.rb
effective_orders-6.9.7 app/models/effective/sold_out_validator.rb
effective_orders-6.9.6 app/models/effective/sold_out_validator.rb
effective_orders-6.9.5 app/models/effective/sold_out_validator.rb
effective_orders-6.9.4 app/models/effective/sold_out_validator.rb
effective_orders-6.9.2 app/models/effective/sold_out_validator.rb