I want to debug my view in rails slim framework.
In my html.erb file i can do this
<%= debug @current_user %>
How do i do this in rails html.slim file?
i tried doing
- 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
but it isnt working.
Any help appreciated
To run Ruby code in Slim template you just need to use = sign
= debug @current_user
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With