From c11142d5c0bd0fc2958f65225dde9243f1d00b12 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Thu, 3 Sep 2020 23:52:59 +0100 Subject: [PATCH 1/1] Convert logout form to use bootstrap --- app/views/users/logout.html.erb | 6 +++--- test/controllers/users_controller_test.rb | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/users/logout.html.erb b/app/views/users/logout.html.erb index 41493e824..3ae4d14f6 100644 --- a/app/views/users/logout.html.erb +++ b/app/views/users/logout.html.erb @@ -2,7 +2,7 @@

<%= t ".heading" %>

<% end %> -<%= form_tag({ :action => "logout" }, { :class => "standard-form" }) do %> - <%= hidden_field_tag("referer", h(params[:referer])) %> - <%= submit_tag t(".logout_button") %> +<%= bootstrap_form_tag do |f| %> + <%= f.hidden_field :referer, :value => params[:referer] %> + <%= f.primary t(".logout_button") %> <% end %> diff --git a/test/controllers/users_controller_test.rb b/test/controllers/users_controller_test.rb index 91ef7222f..1cd9c5dda 100644 --- a/test/controllers/users_controller_test.rb +++ b/test/controllers/users_controller_test.rb @@ -422,7 +422,7 @@ class UsersControllerTest < ActionDispatch::IntegrationTest get logout_path assert_response :success assert_template :logout - assert_select "input[name=referer][value=?]", "" + assert_select "input[name=referer]:not([value])" end def test_logout_fallback_with_referer -- 2.39.5