1 class ReverseValidator < ActiveModel::EachValidator
\r
2 def validate_each(record, attribute, value)
\r
3 record.picture.boosts 'post'
\r
4 if record.picture and record.picture.license_extend.reverse < 0
\r
5 record.errors[attribute] << (options[:message] || I18n.t('activerecord.errors.messages.reverse')) if value < 0
\r