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>
It looks like I have two classes embedded here......what gives?
Thanks!
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit
https://groups.google.com/d/msgid/rubyonrails-talk/ff2e4c06-15b2-43fc-95b4-57224390da42%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.