Sha256: 3725fa982ce831e36c5c5062d5168f3ddd45fe2b20e46ac8186cbf37b311de57

Contents?: true

Size: 255 Bytes

Versions: 25

Compression:

Stored size: 255 Bytes

Contents

module ClarkKent
  class ReportColumnValidator < ActiveModel::Validator
    def validate(record)
      if record.report_sort.present?
        record.errors[:report_sort] << "This column is not sortable." unless record.sortable?
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
clark_kent-0.8.8 app/validators/clark_kent/report_column_validator.rb
clark_kent-0.8.7 app/validators/clark_kent/report_column_validator.rb
clark_kent-0.8.6 app/validators/clark_kent/report_column_validator.rb
clark_kent-0.8.5 app/validators/clark_kent/report_column_validator.rb
clark_kent-0.8.4 app/validators/clark_kent/report_column_validator.rb