提交 83a065d1 编写于 作者: R Rafael Mendonça França

Merge pull request #12890 from akshay-vishnoi/refactor

class methods moved to already defined class<<self block
......@@ -8,14 +8,14 @@ class Callbacks
class << self
delegate :to_prepare, :to_cleanup, :to => "ActionDispatch::Reloader"
end
def self.before(*args, &block)
set_callback(:call, :before, *args, &block)
end
def before(*args, &block)
set_callback(:call, :before, *args, &block)
end
def self.after(*args, &block)
set_callback(:call, :after, *args, &block)
def after(*args, &block)
set_callback(:call, :after, *args, &block)
end
end
def initialize(app)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册