Getting mailer working
This commit is contained in:
@@ -9,7 +9,7 @@ class User < ActiveRecord::Base
|
||||
attr_accessible :email, :password, :password_confirmation, :remember_me
|
||||
require 'open-uri'
|
||||
|
||||
attr_accessible :card_id, :card_number, :card_permissions, :name
|
||||
attr_accessible :card_id, :card_number, :card_permissions, :name, :admin
|
||||
validates_uniqueness_of :card_id, :card_number
|
||||
|
||||
|
||||
|
||||
@@ -39,7 +39,11 @@
|
||||
</div>
|
||||
<div class="field">
|
||||
<%= f.label :card_permissions %><br />
|
||||
<%= f.select :card_permissions, [["Enabled",1],["Disabled",255]] %>
|
||||
<%= f.select :card_permissions, [["Enabled",1],["Disabled",255]] %>
|
||||
</div>
|
||||
<div class="field">
|
||||
<%= f.label :admin, "Admin?" %><br />
|
||||
<%= f.check_box :admin %>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<%= f.submit %>
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
<th>Name</th>
|
||||
<th>Card DB ID</th>
|
||||
<th>Card Number</th>
|
||||
<th>Permissions</th>
|
||||
<th>Card Access</th>
|
||||
<th>Admin?</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
@@ -19,7 +20,8 @@
|
||||
<td><%= user.name %></td>
|
||||
<td><%= user.card_id %></td>
|
||||
<td><%= user.card_number %></td>
|
||||
<td><%= user.card_permissions %></td>
|
||||
<td><%= if user.card_permissions == 1 then "Enabled" else "Disabled" end %></td>
|
||||
<td><%= if user.admin? then "Admin" end %></td>
|
||||
<td><%= link_to 'Upload', upload_path(user) %></td>
|
||||
<td><%= link_to 'Edit', edit_user_path(user) %></td>
|
||||
<td><%= link_to 'Destroy', user, :confirm => 'Are you sure? WARNING: THIS DOES NOT REMOVE THE USER FROM THE DOOR SYSTEM! DISABLE THEM FIRST.', :method => :delete %></td>
|
||||
|
||||
Reference in New Issue
Block a user