Commit ae89f79d by Jon Yurek

Give the spoof validator an instance

Validators love instances. Seriously, though, this was causing a problem
when the validator was being called and the private "send" didn't have
an instance to work on.
parent c72f99d2
......@@ -80,7 +80,8 @@ module Paperclip
def add_required_validations
name = @name
@klass.validates_media_type_spoof_detection name, :if => ->{ send(name).dirty? }
@klass.validates_media_type_spoof_detection name,
:if => ->(instance){ instance.send(name).dirty? }
end
def add_active_record_callbacks
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment