我在我的Rails应用程序中使用了Devise gem进行用户身份验证。现在我有sys管理员角色用户的后端。确认后他可以登录到应用程序。
但是,现在我的客户有user_type Customer.now,对于他们来说,一旦点击确认链接我就不应该显示登录表单。如何创建一个布局只显示客户的确认消息。
答案 0 :(得分:0)
在链接上单击,您需要在控制器上执行操作,如 -
class UsersController < ApplicationController
def confirmation
render layout 'confirmations'
end
end
并在您的视图/布局中创建名为confirmations.html.erb
的新html