Started inital migration to rails 3.2

This commit is contained in:
2013-01-19 01:14:55 -05:00
parent 64aff15deb
commit a9a4cd892f
98 changed files with 968 additions and 363 deletions

36
app/views/users/index.html.erb Executable file
View File

@@ -0,0 +1,36 @@
<h1>All Users</h1>
<table id="users">
<thead>
<tr>
<th>Username</th>
<th>Email</th>
<th>Login Count</th>
<th>Last Sign In</th>
<th>Admin</th>
<th>Created At</th>
<th>Last Edited</th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<% @users.each do |user| %>
<tr>
<th><%= user.username %></th>
<th><%= user.email %></th>
<th><%= user.sign_in_count %></th>
<th><%if user.last_sign_in_at.blank? %>Never logged in<% else %><%= time_ago_in_words(user.last_sign_in_at.to_datetime)+' ago' %><% end %></th>
<th><%= user.admin? %></th>
<th><%= user.created_at.to_s(:datetime).downcase %></th>
<th><%= user.updated_at.to_s(:datetime).downcase %></th>
<th><%= link_to "Edit", edit_user_path(user) %></th>
<th><%= link_to "Delete", user, :method => :delete, :confirm => "Are you sure?" %></th>
</tr>
<% end %>
</tbody>
</table>
<p><%= link_to "New User", new_user_path %></p>