Forum: Ruby on Rails Default value in a Partial that use index

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.
Alain (Guest)
on 2006-04-12 03:33

here is my situation. I have this controler action:

  def list
    @variations = Variation.find(:all,
                                 :conditions =>["client_id = ?",]

Which call this view (removed irrelevant parts):

<p>listes des conceptes existants pour le client actif:<p/>
<%= start_form_tag (:action =>"save_list")%>
	<%= render(:partial => "variation",
			   :collection => @variations )%>

	<input type="submit" value="Sauvegarder" />
<%= end_form_tag %>
with this partial:

<p> concept:<%= h( %>
	variation francaise:<%= text_field "variation", "text_fr","index" => %>
	variation anglaise:<%= text_field "variation", "text_en","index" => %>


using the previous code, I can update the database but when I call the
LIST page the fields arent updated with the default value from
@variations. why?!?

Thanks a lot for the help!
Alain (Guest)
on 2006-04-13 05:38
Since no one answered teh question, I guess its not the 'normal' way to
do this thing. Anyone has a suggestion or code example on how partials
can show the default value of a collections of items?

This topic is locked and can not be replied to.