From b10d659de44cfba44684c34ac9f6e67341ccab65 Mon Sep 17 00:00:00 2001 From: Peter Bhat Harkins Date: Sat, 22 Dec 2018 11:30:51 -0600 Subject: [PATCH] fix hidden_fields for form_with --- app/views/comments/_commentbox.html.erb | 5 ++--- app/views/login/index.html.erb | 2 +- app/views/users/_invitationform.html.erb | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app/views/comments/_commentbox.html.erb b/app/views/comments/_commentbox.html.erb index 2fdc99e70..f9247d100 100644 --- a/app/views/comments/_commentbox.html.erb +++ b/app/views/comments/_commentbox.html.erb @@ -5,11 +5,10 @@ data-shortid="<%= comment.short_id if comment.persisted? %>"> <%= errors_for comment %> <% end %> - <%= f.hidden_field "story_id", :value => comment.story.short_id %> + <%= f.hidden_field "story_id", value: comment.story.short_id %> <% if comment.parent_comment %> - <%= f.hidden_field "parent_comment_short_id", - comment.parent_comment.short_id %> + <%= f.hidden_field "parent_comment_short_id", value: comment.parent_comment.short_id %> <% end %>
diff --git a/app/views/login/index.html.erb b/app/views/login/index.html.erb index dedd6c233..8e87cbbf9 100644 --- a/app/views/login/index.html.erb +++ b/app/views/login/index.html.erb @@ -46,7 +46,7 @@ <% end %> <% if @referer.present? %> - <%= hidden_field_tag :referer, @referer %> + <%= form.hidden_field :referer, value: @referer %> <% end %> <% end %> <% end %> diff --git a/app/views/users/_invitationform.html.erb b/app/views/users/_invitationform.html.erb index a3fc24cea..c340b0288 100644 --- a/app/views/users/_invitationform.html.erb +++ b/app/views/users/_invitationform.html.erb @@ -7,7 +7,7 @@ don't personally know. <%= form_with url: invitations_path, :method => :post do |f| %> <% if defined?(return_home) && return_home %> - <%= f.hidden_field :return_home, 1 %> + <%= f.hidden_field :return_home, value: 1 %> <% end %>