From 5b217c3a7f294a74d4680e71ef64047432b9ffc2 Mon Sep 17 00:00:00 2001 From: George Claghorn Date: Thu, 15 Dec 2016 01:40:22 -0500 Subject: Avoid invalid attribute on local forms generated by `form_with` Fixes that the following ERB template would result in invalid HTML output: <%= form_with model: Post.new, local: true do |form| %> <% end %> Specifically, the resulting form tag would have a spurious `remote` attribute:
--- actionview/lib/action_view/helpers/form_helper.rb | 4 ---- 1 file changed, 4 deletions(-) (limited to 'actionview/lib/action_view/helpers') diff --git a/actionview/lib/action_view/helpers/form_helper.rb b/actionview/lib/action_view/helpers/form_helper.rb index 55389950ed..6c632b8e75 100644 --- a/actionview/lib/action_view/helpers/form_helper.rb +++ b/actionview/lib/action_view/helpers/form_helper.rb @@ -2293,10 +2293,6 @@ module ActionView if options.key?(:skip_id) options[:include_id] = !options.delete(:skip_id) end - - if options.key?(:local) - options[:remote] = !options.delete(:local) - end end end end -- cgit v1.2.3