Use optional parameter to set column class

- Fixes the extremely long class name on the post versions view
- Can now use one value instead of having to set th and td
- Added missing column classes on all tables
This commit is contained in:
BrokenEagle
2020-01-13 20:57:16 +00:00
parent 34c3df78d9
commit 3ab2c4c3ea
24 changed files with 35 additions and 30 deletions

View File

@@ -32,7 +32,7 @@
<%= link_to "»", comment_votes_path(search: { user_name: vote.user.name }) %>
<div><%= time_ago_in_words_tagged(vote.created_at) %></div>
<% end %>
<% t.column do |vote| %>
<% t.column column: "control" do |vote| %>
<% if vote.user == CurrentUser.user %>
<%= link_to "unvote", comment_comment_votes_path(vote.comment), remote: true, method: :delete %>
<% end %>