您好我会为我的设备指定布局 ConfirmationsController
在我的主应用程序视图 application.html.erb 中有这一个
<!DOCTYPE html>
<html style="height:0px !important">
<body class="hold-transition sidebar-mini">
<%if user_signed_in?%>
<%= render 'layouts/header'%>
<%= render 'layouts/sidemenu'%>
<div class="content-wrapper">
<%= render 'layouts/content'%>
<div class="control-sidebar-bg"></div>
</div>
<%= render 'layouts/footer'%>
</div>
<% else %>
<%= render 'layouts/header2'%>
<%= render 'layouts/content'%>
<%end%>
</body>
</html>
我创建了一个布局视图 application2.html.erb ,没有侧边框,页眉和页脚
<!DOCTYPE html>
<html style="height:0px !important">
<body class="hold-transition sidebar-mini">
<%=render'layouts/content'%>
</body>
</html>
在我的 ConfirmationsController 中我把这个
class Users::ConfirmationsController < Devise::ConfirmationsController
layout "application2"
private
def after_confirmation_path_for(resource_name, resource)
create_path
end
end
但它不起作用,我不知道为什么!!!
我想在我的 confirmationsController 中执行create_path后,我的视图页面显示没有sidemenu,页眉和页脚
提前谢谢