templates/cancan.rb in prologue-0.1.2 vs templates/cancan.rb in prologue-0.2.0

- old
+ new

@@ -74,15 +74,15 @@ RUBY end if ENV['PROLOGUE_ADMIN'] inject_into_file 'app/views/admin/users/_form.html.haml', :after => "= f.password_field :password_confirmation\n" do - <<-RUBY - .form_row - - for role in Role.find(:all, :order => "name") - .check_box_item - = check_box_tag "user[role_ids][]", role.id, @user.roles.include?(role) - = role.name.humanize + <<-'RUBY' + .form_row + - Role.find(:all, :order => "name").each do |role| + .check_box_item + = check_box_tag "user[role_ids][]", role.id, @user.roles.include?(role), :id => "user_role_#{role.id}" + %label{:for => "user_role_#{role.id}"}= role.name.humanize RUBY end inject_into_file 'app/controllers/admin/users_controller.rb', :after => "@user = User.new(params[:user])\n" do <<-'RUBY'