summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorshumakl <shumakl@purdue.edu>2014-04-03 11:19:10 -0400
committershumakl <shumakl@purdue.edu>2014-04-03 11:19:10 -0400
commitef22599880973aae8464bacb82e3a04d6277bc43 (patch)
tree92de5c3e91d83da6a8b473277c09dca2f6f21ed4 /app/views
parentf9a4ee4e998f5f113565a93802c041108e9a180d (diff)
Move things around between users and sessions
Diffstat (limited to 'app/views')
-rw-r--r--app/views/sessions/_form.html.erb4
-rw-r--r--app/views/sessions/index.html.erb2
-rw-r--r--app/views/sessions/index.json.jbuilder2
-rw-r--r--app/views/sessions/show.html.erb5
-rw-r--r--app/views/sessions/show.json.jbuilder2
5 files changed, 13 insertions, 2 deletions
diff --git a/app/views/sessions/_form.html.erb b/app/views/sessions/_form.html.erb
index 1b94e77..90ad0ad 100644
--- a/app/views/sessions/_form.html.erb
+++ b/app/views/sessions/_form.html.erb
@@ -15,6 +15,10 @@
<%= f.label :user_id %><br>
<%= f.text_field :user_id %>
</div>
+ <div class="field">
+ <%= f.label :token %><br>
+ <%= f.text_field :token %>
+ </div>
<div class="actions">
<%= f.submit %>
</div>
diff --git a/app/views/sessions/index.html.erb b/app/views/sessions/index.html.erb
index 707a47d..43a7e1f 100644
--- a/app/views/sessions/index.html.erb
+++ b/app/views/sessions/index.html.erb
@@ -4,6 +4,7 @@
<thead>
<tr>
<th>User</th>
+ <th>Token</th>
<th></th>
<th></th>
<th></th>
@@ -14,6 +15,7 @@
<% @sessions.each do |session| %>
<tr>
<td><%= session.user %></td>
+ <td><%= session.token %></td>
<td><%= link_to 'Show', session %></td>
<td><%= link_to 'Edit', edit_session_path(session) %></td>
<td><%= link_to 'Destroy', session, method: :delete, data: { confirm: 'Are you sure?' } %></td>
diff --git a/app/views/sessions/index.json.jbuilder b/app/views/sessions/index.json.jbuilder
index 18fd4fa..5205ede 100644
--- a/app/views/sessions/index.json.jbuilder
+++ b/app/views/sessions/index.json.jbuilder
@@ -1,4 +1,4 @@
json.array!(@sessions) do |session|
- json.extract! session, :id, :user_id
+ json.extract! session, :id, :user_id, :token
json.url session_url(session, format: :json)
end
diff --git a/app/views/sessions/show.html.erb b/app/views/sessions/show.html.erb
index 5176869..230e6bd 100644
--- a/app/views/sessions/show.html.erb
+++ b/app/views/sessions/show.html.erb
@@ -5,5 +5,10 @@
<%= @session.user %>
</p>
+<p>
+ <strong>Token:</strong>
+ <%= @session.token %>
+</p>
+
<%= link_to 'Edit', edit_session_path(@session) %> |
<%= link_to 'Back', sessions_path %>
diff --git a/app/views/sessions/show.json.jbuilder b/app/views/sessions/show.json.jbuilder
index 4ebf936..c9efd3b 100644
--- a/app/views/sessions/show.json.jbuilder
+++ b/app/views/sessions/show.json.jbuilder
@@ -1 +1 @@
-json.extract! @session, :id, :user_id, :created_at, :updated_at
+json.extract! @session, :id, :user_id, :token, :created_at, :updated_at