Could someone please explain to me why I'm getting an
ActionView::TemplateError when I try to use AJAX to update the
interface while using the following code:
I have the following structure: Site -> Building -> Control. Each
loops through it's collection of items and renders a partial for
each. From Site to Building works just fine. However, going from
Building on to Control throws the template error.
It is noteworthy that Controls get added just fine, and if I refresh
the page, all the code works -- but for some reason when I try to do
the AJAX thing, the partial (not the "rjs" file) throws an error.
Wow! Yeah, I was aware of what rails *thought* was the issue, but I
was also *sure* I was in the right. Turns out I was wrong. I'd copied
and pasted the "rjs" code into the new "rjs" file. When I did, I
missed the partial name and left it as "building", so it was passing a
"control" object back to the "building" partial when it should have
been passing it to the "control" partial. Thanks so much for letting
me talk out loud!