stupid questions, how I can rewrite my code in haml?
<% for role in Role.find(:all) %>
<div>
<%= check_box_tag "user[role_ids][]", role.id, @user.roles.include?(role) %>
<%= role.name %>
</div>
And where I can found haml examples, like http://apidock.com/rails/ActionView/Helpers/FormTagHelper/check_box_tag Thanks!
- for role in Role.find(:all)
%div
= check_box_tag "user[role_ids][]", role.id, @user.roles.include?(role)
= role.name
I just used http://html2haml.heroku.com/
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