lib/formtastic/helpers/inputs_helper.rb in formtastic-4.0.0 vs lib/formtastic/helpers/inputs_helper.rb in formtastic-5.0.0
- old
+ new
@@ -1,5 +1,6 @@
+# frozen_string_literal: true
module Formtastic
module Helpers
# {#inputs} is used to wrap a series of form items in a `<fieldset>` and `<ol>`, with each item
# in the list containing the markup representing a single {#input}.
@@ -375,10 +376,10 @@
def inputs_for_nested_attributes(*args, &block) # @private
options = args.extract_options!
args << options.merge!(:parent => { :builder => self, :for => options[:for] })
fields_for_block = if block_given?
- raise ArgumentError, 'You gave :for option with a block to inputs method, ' <<
+ raise ArgumentError, 'You gave :for option with a block to inputs method, ' +
'but the block does not accept any argument.' if block.arity <= 0
lambda do |f|
contents = f.inputs(*args) do
if block.arity == 1 # for backwards compatibility with REE & Ruby 1.8.x
yield(f)