Forum: Ruby on Rails weird objects passing to partials

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
39025a7f572d6fe464e1fe6be399ca3b?d=identicon&s=25 Mike Dershowitz (mdersh53)
on 2007-01-31 04:46

This is a bit of a weird one:

I've got a view with a partial.  The view has a form_for .. do |f|.  I
also have a partial.  The partial has just one field that I need to
capture, that's actually part of the object of the form_for (f).  I need
this one field to be in a partial, becuase it's actually part of a
show-hide, and the partial is 1 of 4 that can be shown.

The form works fine for inserting data.  But I can't get the field on
the partial to work with a passed object.  If I don't pass the object,
and just use a text_field_tag - that works, but how do I then capture
the data in the text_field and still put it with the data for the rest
of the form?

Thanks very much in advance for your help!

This topic is locked and can not be replied to.