class Progstr::Filer::Validation::AttachmentPropertyValidator
Public Class Methods
new(options)
click to toggle source
Calls superclass method
# File lib/filer/validation.rb, line 39 def initialize(options) @property = options[:property] super(options) end
Public Instance Methods
validate_each(record, attribute, attachment)
click to toggle source
Calls superclass method
# File lib/filer/validation.rb, line 44 def validate_each(record, attribute, attachment) unless attachment.pre_validated property_value = attachment.send(@property) super(record, attribute, property_value) unless attachment.nil? || attachment.blank? || property_value.nil? end end