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.0.0 app/models/effective/sold_out_validator.rb
effective_orders-5.9.4 app/models/effective/sold_out_validator.rb
effective_orders-5.9.3 app/models/effective/sold_out_validator.rb
effective_orders-5.9.2 app/models/effective/sold_out_validator.rb
effective_orders-5.9.1 app/models/effective/sold_out_validator.rb
effective_orders-5.9.0 app/models/effective/sold_out_validator.rb
effective_orders-5.8.2 app/models/effective/sold_out_validator.rb
effective_orders-5.8.1 app/models/effective/sold_out_validator.rb
effective_orders-5.8.0 app/models/effective/sold_out_validator.rb
effective_orders-5.7.4 app/models/effective/sold_out_validator.rb
effective_orders-5.7.3 app/models/effective/sold_out_validator.rb
effective_orders-5.7.2 app/models/effective/sold_out_validator.rb
effective_orders-5.7.1 app/models/effective/sold_out_validator.rb
effective_orders-5.7.0 app/models/effective/sold_out_validator.rb
effective_orders-5.6.2 app/models/effective/sold_out_validator.rb
effective_orders-5.6.1 app/models/effective/sold_out_validator.rb
effective_orders-5.6.0 app/models/effective/sold_out_validator.rb
effective_orders-5.5.2 app/models/effective/sold_out_validator.rb
effective_orders-5.5.1 app/models/effective/sold_out_validator.rb
effective_orders-5.5.0 app/models/effective/sold_out_validator.rb