Sha256: 02e73752cd9a13aded14fbafb911e6c418d3842c5981bed5b1e03931718489b2

Contents?: true

Size: 236 Bytes

Versions: 13

Compression:

Stored size: 236 Bytes

Contents

module Of
  class OfferValidator < ActiveModel::Validator
    def validate(record)

      unless record.title.present?
        record.errors[:title] = 'Название не может быть пустым'
      end

    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
c80_yax-0.1.0.25 engines/of/app/models/of/offer_validator.rb
c80_yax-0.1.0.24 engines/of/app/models/of/offer_validator.rb
c80_yax-0.1.0.23 engines/of/app/models/of/offer_validator.rb
c80_yax-0.1.0.22 engines/of/app/models/of/offer_validator.rb
c80_yax-0.1.0.21 engines/of/app/models/of/offer_validator.rb
c80_yax-0.1.0.20 engines/of/app/models/of/offer_validator.rb
c80_yax-0.1.0.18 engines/of/app/models/of/offer_validator.rb
c80_yax-0.1.0.17 engines/of/app/models/of/offer_validator.rb
c80_yax-0.1.0.16 engines/of/app/models/of/offer_validator.rb
c80_yax-0.1.0.15 engines/of/app/models/of/offer_validator.rb
c80_yax-0.1.0.14 engines/of/app/models/of/offer_validator.rb
c80_yax-0.1.0.13 engines/of/app/models/of/offer_validator.rb
c80_yax-0.1.0.12 engines/of/app/models/of/offer_validator.rb