2012-01-11 84 views

回答

11
- for role in Role.find(:all) 
    %div 
    = check_box_tag "user[role_ids][]", role.id, @user.roles.include?(role) 
    = role.name 

我只是用http://html2haml.heroku.com/

+0

谢谢你!这工作! – 2012-01-11 18:22:30

0

也许还不算晚,但总是可以运行的html2haml命令。例如:html2haml app/views/layout/application.html.erb app/views/layouts/application.html.haml

+0

谢谢!我会试试看! – 2012-01-17 16:05:15