Default value in a Partial that use index


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):


listes des conceptes existants pour le client actif:

<%= start_form_tag (:action =>"save_list")%> <%= render(:partial => "variation", :collection => @variations )%>

<input type="submit" value="Sauvegarder" />

<%= end_form_tag %>
with this partial:

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!

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 forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs