Trying to render a partial using a fields_for block. The partial renders the form fields fine, but then renders the output again as escaped HTML. The code to call the partial is here (haml):
= fields_for "advertisement[versions_attributes][#{@advertisement.versions.size-1}]".to_sym, @version do |version_fields|
= render :partial => 'advertisement_versions/fields', :locals => {:f => version_fields}
I’ve tried using – fields_for and – render, but with no luck. – fields_for won’t render the partial, and – render produces the same problem.
If I’m not wrong you can also omit
:partial =>and just do