【发布时间】:2012-10-08 14:50:21
【问题描述】:
我需要在 Devise 将用户重定向到登录页面之前触发回调,可能是因为authenticate_user! 方法检测到他没有登录。类似:
before_filter :authenticate_user!, :only => :edit
def not_authenticated_callback
# do something
end
如果没有调用authenticate_user!,则不应调用它。
【问题讨论】:
标签: ruby-on-rails devise warden