我有這樣的代碼:在ApplicationController中調用超軌道
class ApplicationController < ActionController::Base
def authenticate_user!(*_args)
super
end
end
在authenticate_user!
我打電話super
,這應該叫authenticate_user!
從ActionController::Base
,這是一個抽象類。
我找不到authenticate_user!
裏面ActionController::Base
,所以我想有一些元編程涉及(?)。
Devise的authenticate_user!
怎麼樣在ActionController::Base
?或者在ApplicationController
中使用super
調用的任何其他方法?