class Refinery::Images::Validators::ImageUpdateValidator

Public Instance Methods

validate(record) click to toggle source
# File lib/refinery/images/validators/image_update_validator.rb, line 6
def validate(record)
  if record.image_name_changed?
    record.errors.add :image_name,
      ::I18n.t("different_file_name",
               :scope => "activerecord.errors.models.refinery/image")
  end
end