Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

changed view templates to reflect actual columns in database #13

Open
wants to merge 1 commit into from

1 participant

@dladowitz

When running the rails server, the browser displays errors as 'string' is not an actual column on the User table.

I'm assuming that 'string' is on there as just an example, but this way the browser can at least be fired up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
View
14 chapter_03/social_feed_reader/app/views/users/edit.html.erb
@@ -4,16 +4,16 @@
<%= 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' %>
@@ -21,4 +21,4 @@
<% end %>
<%= link_to 'Show', @user %> |
-<%= link_to 'Back', users_path %>
+<%= link_to 'Back', users_path %>
View
14 chapter_03/social_feed_reader/app/views/users/index.html.erb
@@ -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>
@@ -21,4 +21,4 @@
<br />
-<%= link_to 'New user', new_user_path %>
+<%= link_to 'New user', new_user_path %>
View
14 chapter_03/social_feed_reader/app/views/users/new.html.erb
@@ -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 %>
View
14 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 %>
Something went wrong with that request. Please try again.