_updateFields js should start with first list item position of 1, not 0 #1
@ -15,10 +15,10 @@ class CocoonInput
|
||||
end
|
||||
|
||||
output << template.content_tag(:div, :class => 'links') do
|
||||
template.link_to_add_association template.t('.add'), builder, method
|
||||
template.link_to_add_association template.t('.add'), builder, method, input_html_options
|
||||
end
|
||||
|
||||
data = { :class => 'input cocoon' }
|
||||
data = wraper_html_options.merge(:class => 'input cocoon')
|
||||
if options[:ordered_by]
|
||||
data['data-ordered_by'] = options[:ordered_by]
|
||||
end
|
||||
|
@ -35,6 +35,7 @@ module Cocoon
|
||||
partial = get_partial_path(custom_partial, association)
|
||||
locals = render_options.delete(:locals) || {}
|
||||
method_name = f.respond_to?(:semantic_fields_for) ? :semantic_fields_for : (f.respond_to?(:simple_fields_for) ? :simple_fields_for : :fields_for)
|
||||
|
||||
f.send(method_name, association, new_object, {:child_index => "new_#{association}"}.merge(render_options)) do |builder|
|
||||
partial_options = {:f => builder, :dynamic => true}.merge(locals)
|
||||
render(partial, partial_options)
|
||||
|
Loading…
Reference in New Issue
Block a user