Hi, Scaffold now generate _forms.rhtml, right?? It generate it for me: (_forms.rhtml) <%= error_messages_for ''questions'' %> <!--[form:questions]--> <p><label for="questions_label">Label</label><br/> <%= text_field ''questions'', ''label'' %></p> <p><label for="questions_form">Form</label><br /> <select name="questions[forms_id]"> <% for @form in @forms %> <option name="<%= @form.name %>" value="<%= @form.id %>"> <% end %> </select></p> <!--[eoform:questions]--> And I insert in controller this: @forms = Forms.find_all to show in this select box all forms from database. I think that it is not working because it don''t send the variable ?? How I send the variable wen call: <%= render_partial "form" %> ?? Thank you -- Pedro C. Valentini pedro-p14LI7ZcAE/pVLaUnt/cCQC/G2K4zDHf@public.gmane.org +55 (21) 8708-8035
http://www.pointstorm.com/~gavin/partials-doc/classes/ActionView/Partials.html Pedro Valentini wrote:> Hi, > Scaffold now generate _forms.rhtml, right?? > It generate it for me: (_forms.rhtml) > <%= error_messages_for ''questions'' %> > > <!--[form:questions]--> > <p><label for="questions_label">Label</label><br/> > <%= text_field ''questions'', ''label'' %></p> > <p><label for="questions_form">Form</label><br /> > <select name="questions[forms_id]"> > <% for @form in @forms %> > <option name="<%= @form.name %>" value="<%= @form.id %>"> > <% end %> > </select></p> > <!--[eoform:questions]--> > > And I insert in controller this: > @forms = Forms.find_all > to show in this select box all forms from database. > I think that it is not working because it don''t send the variable ?? > How I send the variable wen call: <%= render_partial "form" %> ?? > > Thank you >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails