我想在rails slim框架中调试我的观点。
在我的html.erb文件中,我可以这样做
<%= debug @current_user %>
如何在rails html.slim文件中执行此操作?
我试过做
- if current_user.has_role?(:student) || current_user.has_role?(:teacher)
.home-header-box.center
h3.welcome-header-title
LP Welcome to TeachForMe
debug current_user
但它不起作用。
任何帮助表示赞赏
要在 Slim 模板中运行 Ruby 代码,您只需要使用=
符号
= debug @current_user