On 7 May 2014 11:26, bertly_the_coder <
muc...@gmail.com> wrote:
> Hi guys,
>
> I've been coding in rails for a while now but I've never been able to render
> fields_for as a partial. I don't know if this is possible, as it should be
> dead simple. Normally when I run across this problem, I just find another
> way to do it.....but sadly, it's time to pay the piper....any help would be
> greatly appreciated.
> My code looks like so:
>
> #form.html.haml
>
> =render partial: "html_panel_fields", locals:{f: f}
>
>
> and my partial looks like this
>
> #_ html_panel_fields.html.haml
>
> = f.simple_fields_for :html_panels do |o|
>
>
> my error is as follows:
>
> undefined local variable or method `f' for
> #<#<Class:0x007fdf7077c8e0>:0x007fdf72175738>
you are using simple_fields_for. Please clarify.