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 479
def initialize(&call)
  @call = call
  @before = []
  @after = []
end
Instance Public methods
after(&after)
# File activesupport/lib/active_support/callbacks.rb, line 490
def after(&after)
  @after.push(after)
  self
end
around(&around)
# File activesupport/lib/active_support/callbacks.rb, line 495
def around(&around)
  CallbackSequence.new do |*args|
    around.call(*args) {
      self.call(*args)
    }
  end
end
before(&before)
# File activesupport/lib/active_support/callbacks.rb, line 485
def before(&before)
  @before.unshift(before)
  self
end
call(*args)
# File activesupport/lib/active_support/callbacks.rb, line 503
def call(*args)
  @before.each { |b| b.call(*args) }
  value = @call.call(*args)
  @after.each { |a| a.call(*args) }
  value
end