Skip to content
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.

Fix FrozenError from nil.to_s << on Ruby 2.7 #382

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/nested_form/view_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ module ViewHelper
def nested_form_for(*args, &block)
options = args.extract_options!.reverse_merge(:builder => NestedForm::Builder)
form_for(*(args << options)) do |f|
capture(f, &block).to_s << after_nested_form_callbacks
capture(f, &block).to_s + after_nested_form_callbacks
end
end

if defined?(NestedForm::SimpleBuilder)
def simple_nested_form_for(*args, &block)
options = args.extract_options!.reverse_merge(:builder => NestedForm::SimpleBuilder)
simple_form_for(*(args << options)) do |f|
capture(f, &block).to_s << after_nested_form_callbacks
capture(f, &block).to_s + after_nested_form_callbacks
end
end
end
Expand All @@ -22,7 +22,7 @@ def simple_nested_form_for(*args, &block)
def semantic_nested_form_for(*args, &block)
options = args.extract_options!.reverse_merge(:builder => NestedForm::FormtasticBuilder)
semantic_form_for(*(args << options)) do |f|
capture(f, &block).to_s << after_nested_form_callbacks
capture(f, &block).to_s + after_nested_form_callbacks
end
end
end
Expand All @@ -31,7 +31,7 @@ def semantic_nested_form_for(*args, &block)
def semantic_bootstrap_nested_form_for(*args, &block)
options = args.extract_options!.reverse_merge(:builder => NestedForm::FormtasticBootstrapBuilder)
semantic_form_for(*(args << options)) do |f|
capture(f, &block).to_s << after_nested_form_callbacks
capture(f, &block).to_s + after_nested_form_callbacks
end
end
end
Expand Down