Sha256: 4bc783afbc9df397af21d2450714548900c59746d2a83f201f1795c453d6173f

Contents?: true

Size: 171 Bytes

Versions: 9

Compression:

Stored size: 171 Bytes

Contents

class PaperclipValidator < ActiveModel::Validator
  def validate(record)
    record.errors[:file] << 'Must specify a file' unless record.file_file_name.present?
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
slices-2.0.2 lib/paperclip_validator.rb
slices-2.0.1 lib/paperclip_validator.rb
slices-2.0.0 lib/paperclip_validator.rb
slices-1.0.5 lib/paperclip_validator.rb
slices-1.0.4 lib/paperclip_validator.rb
slices-1.0.3 lib/paperclip_validator.rb
slices-1.0.2 lib/paperclip_validator.rb
slices-1.0.1 lib/paperclip_validator.rb
slices-1.0.0 lib/paperclip_validator.rb