<%= render :partial => 'spree/shared/error_messages', :locals => { :target => @role } %>
<%= form_tag [:admin, @role], :method => method do %> <% end %>
Name:<%= text_field_tag 'role[name]', @role.name %>
Permissions: <% @permissions.each do |permission| %> <% if @role.has_permission?(permission.title) %> <%= check_box_tag 'role[permission_ids][]', permission.id, true %><%= permission.title.gsub('-',' ').titleize %> <% else %> <%= check_box_tag 'role[permission_ids][]', permission.id %><%= permission.title.gsub('-',' ').titleize %> <% end %>
<% end %>
<%= submit_tag %>