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.11.3 app/validators/clark_kent/report_column_validator.rb
clark_kent-0.11.2 app/validators/clark_kent/report_column_validator.rb
clark_kent-0.11.1 app/validators/clark_kent/report_column_validator.rb
clark_kent-0.11.0 app/validators/clark_kent/report_column_validator.rb
clark_kent-0.10.4 app/validators/clark_kent/report_column_validator.rb
clark_kent-0.10.2 app/validators/clark_kent/report_column_validator.rb
clark_kent-0.10.1 app/validators/clark_kent/report_column_validator.rb
clark_kent-0.10.0 app/validators/clark_kent/report_column_validator.rb
clark_kent-0.9.9 app/validators/clark_kent/report_column_validator.rb
clark_kent-0.9.8 app/validators/clark_kent/report_column_validator.rb
clark_kent-0.9.7 app/validators/clark_kent/report_column_validator.rb
clark_kent-0.9.6 app/validators/clark_kent/report_column_validator.rb
clark_kent-0.9.5 app/validators/clark_kent/report_column_validator.rb
clark_kent-0.9.4 app/validators/clark_kent/report_column_validator.rb
clark_kent-0.9.2 app/validators/clark_kent/report_column_validator.rb
clark_kent-0.9.1 app/validators/clark_kent/report_column_validator.rb
clark_kent-0.9.0 app/validators/clark_kent/report_column_validator.rb
clark_kent-0.8.11 app/validators/clark_kent/report_column_validator.rb
clark_kent-0.8.10 app/validators/clark_kent/report_column_validator.rb
clark_kent-0.8.9 app/validators/clark_kent/report_column_validator.rb