Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changed view templates to reflect actual columns in database #13

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 7 additions & 7 deletions chapter_03/social_feed_reader/app/views/users/edit.html.erb
Expand Up @@ -4,21 +4,21 @@
<%= f.error_messages %>

<p>
<%= f.label :string %><br />
<%= f.text_field :string %>
<%= f.label :name %><br />
<%= f.text_field :name %>
</p>
<p>
<%= f.label :string %><br />
<%= f.text_field :string %>
<%= f.label :bio %><br />
<%= f.text_field :bio %>
</p>
<p>
<%= f.label :string %><br />
<%= f.text_field :string %>
<%= f.label :email %><br />
<%= f.text_field :email %>
</p>
<p>
<%= f.submit 'Update' %>
</p>
<% end %>

<%= link_to 'Show', @user %> |
<%= link_to 'Back', users_path %>
<%= link_to 'Back', users_path %>
14 changes: 7 additions & 7 deletions chapter_03/social_feed_reader/app/views/users/index.html.erb
Expand Up @@ -2,16 +2,16 @@

<table>
<tr>
<th>String</th>
<th>String</th>
<th>String</th>
<th>Name</th>
<th>Bio</th>
<th>Email</th>
</tr>

<% @users.each do |user| %>
<tr>
<td><%=h user.string %></td>
<td><%=h user.string %></td>
<td><%=h user.string %></td>
<td><%=h user.name %></td>
<td><%=h user.bio %></td>
<td><%=h user.email %></td>
<td><%= link_to 'Show', user %></td>
<td><%= link_to 'Edit', edit_user_path(user) %></td>
<td><%= link_to 'Destroy', user, :confirm => 'Are you sure?', :method => :delete %></td>
Expand All @@ -21,4 +21,4 @@

<br />

<%= link_to 'New user', new_user_path %>
<%= link_to 'New user', new_user_path %>
14 changes: 7 additions & 7 deletions chapter_03/social_feed_reader/app/views/users/new.html.erb
Expand Up @@ -4,20 +4,20 @@
<%= f.error_messages %>

<p>
<%= f.label :string %><br />
<%= f.text_field :string %>
<%= f.label :name %><br />
<%= f.text_field :name %>
</p>
<p>
<%= f.label :string %><br />
<%= f.text_field :string %>
<%= f.label :bio %><br />
<%= f.text_field :bio %>
</p>
<p>
<%= f.label :string %><br />
<%= f.text_field :string %>
<%= f.label :email %><br />
<%= f.text_field :email %>
</p>
<p>
<%= f.submit 'Create' %>
</p>
<% end %>

<%= link_to 'Back', users_path %>
<%= link_to 'Back', users_path %>
14 changes: 7 additions & 7 deletions chapter_03/social_feed_reader/app/views/users/show.html.erb
@@ -1,18 +1,18 @@
<p>
<b>String:</b>
<%=h @user.string %>
<b>Name:</b>
<%=h @user.name %>
</p>

<p>
<b>String:</b>
<%=h @user.string %>
<b>Bio:</b>
<%=h @user.bio %>
</p>

<p>
<b>String:</b>
<%=h @user.string %>
<b>Email:</b>
<%=h @user.email %>
</p>


<%= link_to 'Edit', edit_user_path(@user) %> |
<%= link_to 'Back', users_path %>
<%= link_to 'Back', users_path %>