Commit 44df8639 by Kylan McBride Committed by Jon Yurek

Callbacks: Provide necessary lambda arguments

parent 34121da5
...@@ -7,7 +7,7 @@ module Paperclip ...@@ -7,7 +7,7 @@ module Paperclip
module Defining module Defining
def define_paperclip_callbacks(*callbacks) def define_paperclip_callbacks(*callbacks)
define_callbacks(*[callbacks, {terminator: -> {result == false}}].flatten) define_callbacks *[callbacks, {terminator: -> (target, result) {result == false}}].flatten
callbacks.each do |callback| callbacks.each do |callback|
eval <<-end_callbacks eval <<-end_callbacks
def before_#{callback}(*args, &blk) def before_#{callback}(*args, &blk)
......
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