add is_admin attribute to users

This commit is contained in:
Stella Rouzi 2014-07-18 14:43:49 +03:00
parent 07877f3256
commit 0418924d8e
7 changed files with 25 additions and 21 deletions

View file

@ -0,0 +1,12 @@
- if current_user == user
You cannot modify your own role!
%br
%button{:class=> "btn btn-danger", "data-dismiss"=> "modal", "aria-hidden"=>"true"}
Cancel
- else
= "Give #{user.name} (#{user.email}) the following roles:"
= semantic_form_for(user, :url => admin_user_path(user), :method => :put) do |f|
= f.input :roles, :label => false, collection: @roles
%button{:class=> "btn btn-danger", "data-dismiss"=> "modal", "aria-hidden"=>"true"}
Cancel
= f.action :submit, :as => :button, :button_html => {:value => "Save", :class => "btn btn-primary"}