Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
before_filter :authenticate_user!如果我登录到活动管理员并且因此我是,是否有一种简单的方法可以跳过模型的设计current_admin_user?
before_filter :authenticate_user!
current_admin_user
你试过吗?
before_filter :authenticate_user!, unless: :current_admin_user
如果变量 :current_admin_user 为真,则不应运行 before_filter。