Skip to content

Instantly share code, notes, and snippets.

@px-amaac
Created April 7, 2013 06:43
Show Gist options
  • Save px-amaac/5329331 to your computer and use it in GitHub Desktop.
Save px-amaac/5329331 to your computer and use it in GitHub Desktop.
This is the code that i replaced the bootstrap stuff with. It is missing something.
<%-# from users/index.html.erb -%>
<a href="roles#<%= user.id %>" data-reveal-id="roleModal" class="button" type="button">Change role</a>
<%= render user %>
<%-# from users/_roles.html.erb-%>
<div id="roleModal" class="reveal-modal">
<%= semantic_form_for user, :url => user_path(user), :html => {:method => :put } do |f| %>
<h3>Change Role</h3>
<div class="reveal-modal-body">
<%= f.input :roles, :as => :check_boxes, :input_html => { :selected => user.role_ids } %>
</div>
<a class="close-reveal-modal">&#215;</a>
<%= f.submit "Change Role", :class => "button" %>
<% end %>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment