I have a page in which a form works just fine--in the main page. If I
extract it to a partial, the same code calls not the desired add_items
method, but a remove_items method.
Indeed, Firebug tells me that my form tag is just not rendered when
its moved to a partial.
What's happening?
The partial is:
<% form_tag(my_digi_add_my_game_path(@my_game)) do %>
<table>
...
</table>
<%= submit_tag "include" %>
<% end %>
--
You received this message because you are subscribed to the Google Groups "Columbus Ruby Brigade" group.
To post to this group, send email to colum...@googlegroups.com.
To unsubscribe from this group, send email to columbusrb+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/columbusrb?hl=en.
OK, the problem was that a previous form_tag wouldn't produce a closed
form. Thus the second form_tag (via the partial) generated a form in a
form. Surrounding it with div's somehow solved it, I don't know why.
Thanks for larnin me about locals though. Good to know,
e
On Jan 5, 2:43 pm, Ryan Briones <ryan.brio...@brionesandco.com> wrote:
> The only thing "weird" I see is that you shouldn't be accessing instance
> variables from within your partial. Pass it in as a local if you need access
> to it. It's possible that Rails enforces this explicitly now, I don't know.
>
>
>
> On Tue, Jan 5, 2010 at 1:25 PM, Ed Jones <ed.jo...@gmail.com> wrote:
> > Help, my form has fallen and it won't get up.
>
> > I have a page in which a form works just fine--in the main page. If I
> > extract it to a partial, the same code calls not the desired add_items
> > method, but a remove_items method.
>
> > Indeed, Firebug tells me that my form tag is just not rendered when
> > its moved to a partial.
>
> > What's happening?
>
> > The partial is:
> > <% form_tag(my_digi_add_my_game_path(@my_game)) do %>
> > <table>
> > ...
> > </table>
> > <%= submit_tag "include" %>
> > <% end %>
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Columbus Ruby Brigade" group.
> > To post to this group, send email to colum...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > columbusrb+...@googlegroups.com<columbusrb%2Bunsu...@googlegroups.com>
Is the first form closed with an <% end %>? I would assume that
correcting that issue would make the extra div unnecessary. It would
also eliminate the possibility of different browsers handling the HTML
error differently. Good Luck
-Mike
To unsubscribe from this group, send email to columbusrb+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/columbusrb?hl=en.
Ryan: Glad u like Chicago. And the Cubs haven't even played!!
e