- ActiveSupport::Callbacks , , CallbackChain#append_one , , before_action remove_duplicates , . , before_action:
module MyModule
extend ActiveSupport::Concern
included do
before_action :my_last_callback
end
class_methods do
def before_action(*args, &blk)
method(:before_action).super_method.call(*args, &blk)
method(:before_action).super_method.call(:my_last_callback)
end
end
def my_last_callback
end
end
before_action, , , my_last_callback . ( / , , , O (N ^ 2) O (N) , - , ).