Class: PaperclipValidator

Inherits:
ActiveModel::Validator
  • Object
show all
Defined in:
lib/paperclip_validator.rb

Instance Method Summary collapse

Instance Method Details

#validate(record) ⇒ Object



2
3
4
# File 'lib/paperclip_validator.rb', line 2

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