Issue
I am learning a rails on YouTube and here I am having issues with table style. The video is old and rails are update already. However, I am following exactly what he is doing in the video, but I ended up with this weird looking table of friends list.
I want to put all friends info next to each other up-and-down like the video.
Solution
I think you want something like this.
<table class="table table-sm table-bordered table-hover table-inverse table-responsive">
<thead class="thead-inverse|thead-default">
<tr>
<th>First Name</th>
<th>Last Name</th>
<th>Phone</th>
<th>Email</th>
<th>Twitter</th>
</tr>
</thead>
<tbody>
<% @friends.each do |friend| %>
<tr>
<td><%= friend.firstname %></td>
<td><%= friend.lastname %></td>
<td><%= friend.phone %></td>
<td><%= friend.email %></td>
<td><%= friend.twitter %></td>
</tr>
<% end %>
</tbody>
</table>
Answered By - smehsan
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.