Skip to content

Commit

Permalink
Use String interpolation for field_options[:left] so a nil doesn't ca…
Browse files Browse the repository at this point in the history
…use an exception
  • Loading branch information
wingrunr21 committed Apr 1, 2014
1 parent 43d7d19 commit e70c5c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/bootstrap_form/form_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def form_group(name = nil, options = {}, &block)
def fields_for(record_name, record_object = nil, fields_options = {}, &block)
fields_options, record_object = record_object, nil if record_object.is_a?(Hash) && record_object.extractable_options?
fields_options[:layout] ||= options[:layout]
fields_options[:label_col] = (fields_options.include?(:label_col)) ? fields_options[:label_col] + " #{label_class}" : options[:label_col]
fields_options[:label_col] = (fields_options.include?(:label_col)) ? "#{fields_options[:label_col]} #{label_class}" : options[:label_col]
fields_options[:control_col] ||= options[:control_col]
super(record_name, record_object, fields_options, &block)
end
Expand Down

0 comments on commit e70c5c5

Please sign in to comment.