diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2019-03-10 16:31:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-10 16:31:15 +0100 |
commit | c87f6841b77e5827ca7bd03a629e2d615fae0d06 (patch) | |
tree | 8e62191b003d0dd096578566f891b66449191a57 /actionview/lib/action_view | |
parent | 08a93efab6bdf10ba7afafb6e51f4b7809c97ebc (diff) | |
parent | c99e673902539a0bb1762a8786671f812076c2d9 (diff) | |
download | rails-c87f6841b77e5827ca7bd03a629e2d615fae0d06.tar.gz rails-c87f6841b77e5827ca7bd03a629e2d615fae0d06.tar.bz2 rails-c87f6841b77e5827ca7bd03a629e2d615fae0d06.zip |
Merge pull request #35121 from utilum/warning_tried_to_create_proc_without_block
Ruby 2.7 warning: creating a Proc without a block
Diffstat (limited to 'actionview/lib/action_view')
-rw-r--r-- | actionview/lib/action_view/helpers/form_helper.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionview/lib/action_view/helpers/form_helper.rb b/actionview/lib/action_view/helpers/form_helper.rb index c5a736bfb4..5533cef249 100644 --- a/actionview/lib/action_view/helpers/form_helper.rb +++ b/actionview/lib/action_view/helpers/form_helper.rb @@ -739,7 +739,7 @@ module ActionView # def labelled_form_with(**options, &block) # form_with(**options.merge(builder: LabellingFormBuilder), &block) # end - def form_with(model: nil, scope: nil, url: nil, format: nil, **options) + def form_with(model: nil, scope: nil, url: nil, format: nil, **options, &block) options[:allow_method_names_outside_object] = true options[:skip_default_ids] = !form_with_generates_ids @@ -752,7 +752,7 @@ module ActionView if block_given? builder = instantiate_builder(scope, model, options) - output = capture(builder, &Proc.new) + output = capture(builder, &block) options[:multipart] ||= builder.multipart? html_options = html_options_for_form_with(url, model, options) |