- <%= table_for @notes, {class: "striped autofit"} do |t| %>
+ <%= table_for @notes, class: "striped autofit" do |t| %>
<% t.column "Post" do |note| %>
<%= link_to note.post_id, note.post %>
<% end %>
diff --git a/app/views/pool_versions/_listing.html.erb b/app/views/pool_versions/_listing.html.erb
index bf663495a..6dbf9e4ee 100644
--- a/app/views/pool_versions/_listing.html.erb
+++ b/app/views/pool_versions/_listing.html.erb
@@ -1,6 +1,6 @@
- <%= table_for @pool_versions, {class: "striped autofit", width: "100%"} do |t| %>
+ <%= table_for @pool_versions, class: "striped autofit", width: "100%" do |t| %>
<% t.column column: "diff", width: "3%" do |pool_version| %>
<%= link_to_if pool_version_show_diff(pool_version, params[:type]), "diff", diff_pool_version_path(pool_version.id) %>
<% end %>
diff --git a/app/views/post_disapprovals/index.html.erb b/app/views/post_disapprovals/index.html.erb
index 84087cd22..9b3b23adf 100644
--- a/app/views/post_disapprovals/index.html.erb
+++ b/app/views/post_disapprovals/index.html.erb
@@ -13,7 +13,7 @@
<%= f.submit "Search" %>
<% end %>
- <%= table_for @post_disapprovals, {class: "striped autofit", width: "100%"} do |t| %>
+ <%= table_for @post_disapprovals, class: "striped autofit", width: "100%" do |t| %>
<% t.column "Post" do |post_disapproval| %>
<%= link_to "post ##{post_disapproval.post_id}", post_path(post_disapproval.post_id) %>
<%= link_to "»", post_disapprovals_path(search: params[:search].merge(post_id: post_disapproval.post_id)) %>
diff --git a/app/views/post_replacements/index.html.erb b/app/views/post_replacements/index.html.erb
index e367cfdc8..b0dd09c87 100644
--- a/app/views/post_replacements/index.html.erb
+++ b/app/views/post_replacements/index.html.erb
@@ -10,7 +10,7 @@
<%= f.submit "Search" %>
<% end %>
- <%= table_for @post_replacements, {class: "striped autofit", width: "100%"} do |t| %>
+ <%= table_for @post_replacements, class: "striped autofit", width: "100%" do |t| %>
<% t.column "Post", width: "1%" do |post_replacement| %>
<%= PostPresenter.preview(post_replacement.post, show_deleted: true) %>
<% end %>
diff --git a/app/views/post_votes/index.html.erb b/app/views/post_votes/index.html.erb
index 005bbdd0c..a9ba0be9e 100644
--- a/app/views/post_votes/index.html.erb
+++ b/app/views/post_votes/index.html.erb
@@ -8,7 +8,7 @@
<%= f.submit "Search" %>
<% end %>
- <%= table_for @post_votes, {class: "striped autofit"} do |t| %>
+ <%= table_for @post_votes, class: "striped autofit" do |t| %>
<% t.column "Post" do |vote| %>
<%= PostPresenter.preview(vote.post, show_deleted: true) %>
<% end %>
diff --git a/app/views/saved_searches/index.html.erb b/app/views/saved_searches/index.html.erb
index 24a96f777..8195bf54b 100644
--- a/app/views/saved_searches/index.html.erb
+++ b/app/views/saved_searches/index.html.erb
@@ -14,7 +14,7 @@
<%= f.submit "Search" %>
<% end %>
- <%= table_for @saved_searches, {class: "striped autofit", width: "100%"} do |t| %>
+ <%= table_for @saved_searches, class: "striped autofit", width: "100%" do |t| %>
<% t.column "Query", th: {"data-sort": "string"}, td: {class: "col-expand"} do |ss| %>
<%= link_to ss.query, posts_path(tags: ss.query) %>
<% end %>
diff --git a/app/views/table_builder/_table.html.erb b/app/views/table_builder/_table.html.erb
index 05f5a9f53..2cf2cfe1b 100644
--- a/app/views/table_builder/_table.html.erb
+++ b/app/views/table_builder/_table.html.erb
@@ -1,8 +1,8 @@
-<%= tag.table table.table_attributes do %>
+<%= tag.table **table.table_attributes do %>
<% table.columns.each do |column| %>
- <%= tag.th column.header_attributes do %>
+ <%= tag.th **column.header_attributes do %>
<%= column.name %>
<% end %>
<% end %>
@@ -11,9 +11,9 @@
<% table.items.each_with_index do |item, i| %>
- <%= tag.tr table.all_row_attributes(item, i) do %>
+ <%= tag.tr **table.all_row_attributes(item, i) do %>
<% table.columns.each_with_index do |column, j| %>
- <%= tag.td column.body_attributes do %>
+ <%= tag.td **column.body_attributes do %>
<%= column.value(item, i, j) %>
<% end %>
<% end %>
diff --git a/app/views/tags/index.html.erb b/app/views/tags/index.html.erb
index 8f2d2f621..8648b1466 100644
--- a/app/views/tags/index.html.erb
+++ b/app/views/tags/index.html.erb
@@ -4,7 +4,7 @@
<%= render "search" %>
- <%= table_for @tags, {class: "striped autofit"} do |t| %>
+ <%= table_for @tags, class: "striped autofit" do |t| %>
<% t.column :post_count, name: "Count" %>
<% t.column "Name", td: {class: "col-expand"} do |tag| %>
<%= link_to_wiki "?", tag.name, class: tag_class(tag) %>
diff --git a/app/views/uploads/index.html.erb b/app/views/uploads/index.html.erb
index 5e6819585..55e75beb2 100644
--- a/app/views/uploads/index.html.erb
+++ b/app/views/uploads/index.html.erb
@@ -3,7 +3,7 @@
<%= render "uploads/search" %>
<%= render "posts/partials/common/inline_blacklist" %>
- <%= table_for @uploads, {class: "striped autofit", width: "100%"} do |t| %>
+ <%= table_for @uploads, class: "striped autofit", width: "100%" do |t| %>
<% t.column "Upload" do |upload| %>
<%= PostPresenter.preview(upload.post, tags: "user:#{upload.uploader.name}", show_deleted: true) %>
<% end %>
diff --git a/app/views/user_feedbacks/index.html.erb b/app/views/user_feedbacks/index.html.erb
index 35a50e961..7fc9733b1 100644
--- a/app/views/user_feedbacks/index.html.erb
+++ b/app/views/user_feedbacks/index.html.erb
@@ -13,7 +13,7 @@
<%= f.submit "Search" %>
<% end %>
- <%= table_for @user_feedbacks, {class: "striped autofit"} do |t| %>
+ <%= table_for @user_feedbacks, class: "striped autofit" do |t| %>
<% t.column "User" do |feedback| %>
<%= link_to_user feedback.user %>
<%= link_to "»", user_feedbacks_path(search: { user_name: feedback.user.name }) %>
diff --git a/test/functional/users_controller_test.rb b/test/functional/users_controller_test.rb
index 4e43a48be..3da20f6b5 100644
--- a/test/functional/users_controller_test.rb
+++ b/test/functional/users_controller_test.rb
@@ -127,7 +127,7 @@ class UsersControllerTest < ActionDispatch::IntegrationTest
assert_redirected_to User.last
assert_equal("xxx", User.last.name)
assert_equal(User.last, User.last.authenticate_password("xxxxx1"))
- assert_equal(nil, User.last.email_address)
+ assert_nil(User.last.email_address)
assert_no_enqueued_emails
end
diff --git a/test/test_helper.rb b/test/test_helper.rb
index 6fafbaa57..1305c401e 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -89,25 +89,25 @@ class ActionDispatch::IntegrationTest
mock_post_version_service!
mock_pool_version_service!
- def method_authenticated(method_name, url, user, options)
+ def method_authenticated(method_name, url, user, **options)
post session_path, params: { name: user.name, password: user.password }
- self.send(method_name, url, options)
+ send(method_name, url, **options)
end
- def get_auth(url, user, options = {})
- method_authenticated(:get, url, user, options)
+ def get_auth(url, user, **options)
+ method_authenticated(:get, url, user, **options)
end
- def post_auth(url, user, options = {})
- method_authenticated(:post, url, user, options)
+ def post_auth(url, user, **options)
+ method_authenticated(:post, url, user, **options)
end
- def put_auth(url, user, options = {})
- method_authenticated(:put, url, user, options)
+ def put_auth(url, user, **options)
+ method_authenticated(:put, url, user, **options)
end
- def delete_auth(url, user, options = {})
- method_authenticated(:delete, url, user, options)
+ def delete_auth(url, user, **options)
+ method_authenticated(:delete, url, user, **options)
end
def setup
diff --git a/test/unit/post_disapproval_test.rb b/test/unit/post_disapproval_test.rb
index 8def746e1..f16203e48 100644
--- a/test/unit/post_disapproval_test.rb
+++ b/test/unit/post_disapproval_test.rb
@@ -21,7 +21,7 @@ class PostDisapprovalTest < ActiveSupport::TestCase
should "not allow blank messages" do
@post_disapproval = create(:post_disapproval, post: @post_1, message: "")
- assert_equal(nil, @post_disapproval.message)
+ assert_nil(@post_disapproval.message)
end
context "made by alice" do