Execute before and after filters in a sequence instead of chaining them with nested lambda calls, see: github.com/rails/rails/issues/18011

Methods
A
B
C
N
Class Public methods
new(&call)
# File activesupport/lib/active_support/callbacks.rb, line 429
def initialize(&call)
  @call = call
  @before = []
  @after = []
end
Instance Public methods
after(&after)
# File activesupport/lib/active_support/callbacks.rb, line 440
def after(&after)
  @after.push(after)
  self
end
around(&around)
# File activesupport/lib/active_support/callbacks.rb, line 445
def around(&around)
  CallbackSequence.new do |arg|
    around.call(arg) {
      self.call(arg)
    }
  end
end
before(&before)
# File activesupport/lib/active_support/callbacks.rb, line 435
def before(&before)
  @before.unshift(before)
  self
end
call(arg)
# File activesupport/lib/active_support/callbacks.rb, line 453
def call(arg)
  @before.each { |b| b.call(arg) }
  value = @call.call(arg)
  @after.each { |a| a.call(arg) }
  value
end