app/models/hyrax/avatar_validator.rb in hyrax-3.0.0.pre.rc1 vs app/models/hyrax/avatar_validator.rb in hyrax-3.0.0.pre.rc2

- old
+ new

@@ -1,4 +1,5 @@ +# frozen_string_literal: true module Hyrax class AvatarValidator < ActiveModel::Validator def validate(record) return unless record.avatar? record.errors.add(:avatar_file_size, 'must be less than 2MB') if record.avatar.size > 2.megabytes.to_i