I have a form that displays a set of inputs. I also have a button, and when clicked, I make an ajax request which is supposed to replace the existing inputs with a different set
Can you use fields_for in your partial, and pass the @object to it? That way you don't need to pass a form builder?
partial:
<%= fields_for object do |f| %> f.text_field :field_name <% end %>
$('#info').html("<%= escape_javascript(render 'my_second_fields_partial', object: @object) %>