<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Rails Forum - Ruby on Rails Help and Discussion Forum - Editing Multiple Models in One Form]]></title>
		<link>http://railsforum.com/viewtopic.php?id=719</link>
		<description><![CDATA[The most recent posts in Editing Multiple Models in One Form.]]></description>
		<lastBuildDate>Sat, 23 May 2009 18:36:58 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Editing Multiple Models in One Form]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=98547#p98547</link>
			<description><![CDATA[<p>Hi I am a newbie and have a question. I dont follow the operation </p><p># &lt;% for @task in @project.tasks %&gt;<br />#&nbsp; &nbsp;&lt;%= error_messages_for :task %&gt;<br />#&nbsp; &nbsp;&lt;% fields_for &quot;task[]&quot; do |f| %&gt;<br />#&nbsp; &nbsp; &nbsp;&lt;p&gt;&lt;%= f.text_field :name %&gt;&lt;/p&gt;<br />#&nbsp; &nbsp;&lt;% end %&gt;<br /># &lt;% end %&gt;</p><p>when you create a @task. Does that mean we could create instance variables on templates as well cuz normally while iterating its just <br />&lt;% for task in @project.tasks %&gt;</p><br /><p>and the second thing that I don&#039;t follow is the <br />&lt;% fields_for &quot;task[]&quot; do |f| %&gt;</p><p>what does that do. I do understand the concept of the fields_for but I dont get the &quot;task[]&quot; bit.</p><p>I would greatly appreciate any explanation on this. Excuse me if this seems suprisingly silly.</p>]]></description>
			<author><![CDATA[dummy@example.com (Sid.Ravichandran)]]></author>
			<pubDate>Sat, 23 May 2009 18:36:58 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=98547#p98547</guid>
		</item>
		<item>
			<title><![CDATA[Re: Editing Multiple Models in One Form]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=92179#p92179</link>
			<description><![CDATA[<p>Hi All,<br />I have tried to edit the multiple models in one form using ryns tutorial editing multiple models in one form.<br />But could not able to make it work.</p><p>And error am getting like:<br />Unknown action<br />No action responded to 79. Actions: create, destroy, edit, index, new, redirect_back, show, and update</p><p>and my code snippet:<br />in containterformatcontrolelr:<br />--------------------<br />def update<br />&nbsp; &nbsp; @containerformat = Containerformat.find(params[:id])<br />&nbsp; &nbsp; @containerformat.attributes = params[:containerformat] <br />&nbsp; &nbsp; @containerformat.transportstreams.each { |t| t.attributes = params[:transportstream][t.id.to_s] } </p><p>&nbsp; &nbsp; respond_to do |format|<br />&nbsp; &nbsp; &nbsp; if @containerformat.update_attributes(params[:containerformat])<br />&nbsp; &nbsp; &nbsp; &nbsp; flash[:notice] = &#039;Containerformat was successfully updated.&#039;<br />&nbsp; &nbsp; &nbsp; &nbsp; format.html { redirect_to(@containerformat) }<br />&nbsp; &nbsp; &nbsp; &nbsp; format.xml&nbsp; { head :ok }<br />&nbsp; &nbsp; &nbsp; else<br />&nbsp; &nbsp; &nbsp; &nbsp; format.html { render :action =&gt; &quot;edit&quot; }<br />&nbsp; &nbsp; &nbsp; &nbsp; format.xml&nbsp; { render :xml =&gt; @containerformat.errors, :status =&gt; :unprocessable_entity }<br />&nbsp; &nbsp; &nbsp; end<br />&nbsp; &nbsp; end<br />&nbsp; end</p><p>edit.html.erb<br />-------------<br />&lt;div id=&quot;content&quot;&gt;<br />&lt;h1&gt;Edit containerformat&lt;/h1&gt; <br />&lt;%= error_messages_for :containerformat %&gt; <br />&lt;%= form_tag :action =&gt; &#039;update&#039;, :id =&gt; params[:id] %&gt;<br />&lt;p&gt;&nbsp; Stream Name:&nbsp; &lt;%= text_field :containerformat, :streamName %&gt;&lt;/p&gt;<br />&lt;h2&gt;transportstream&lt;/h2&gt;<br />&lt;% for @transportstream in @containerformat.transportstreams %&gt;&nbsp; <br />&lt;%= error_messages_for :transportstream %&gt;&nbsp; <br />&lt;% fields_for &quot;transportstream[]&quot; do |f| %&gt;&nbsp; <br />&lt;p&gt;&lt;%= f.text_field :numPrograms %&gt;&lt;/p&gt;<br />&lt;% end %&gt;<br />&lt;% end %&gt; <br />&lt;p&gt;&lt;%= submit_tag &#039;Update&#039; %&gt;&lt;/p&gt;</p><p>can anyone suggested me wher i am doing the mistake?</p><p>thanks<br />Srikanth</p>]]></description>
			<author><![CDATA[dummy@example.com (srikanth)]]></author>
			<pubDate>Mon, 30 Mar 2009 11:53:42 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=92179#p92179</guid>
		</item>
		<item>
			<title><![CDATA[Re: Editing Multiple Models in One Form]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=69099#p69099</link>
			<description><![CDATA[<p>There is one more issue I am facing after updating</p><p>I changed my update function like this:</p><p>&nbsp; def update<br />&nbsp; &nbsp; @project = Project.find(params[:id])<br />&nbsp; &nbsp; @project.attributes = params[:project]<br />&nbsp; &nbsp; @project.agreementfile.attributes = params[:agreementfile]</p><p>&nbsp; &nbsp; respond_to do |format|<br />&nbsp; &nbsp; &nbsp; if @project.valid? &amp;&amp; @project.agreementfile.valid<br />&nbsp; &nbsp; &nbsp; &nbsp; @project.save!<br />&nbsp; &nbsp; &nbsp; &nbsp; @project.agreementfile.save!<br />&nbsp; &nbsp; &nbsp; &nbsp; flash[:notice] = &#039;Project was successfully updated.&#039;<br />&nbsp; &nbsp; &nbsp; &nbsp; format.html { redirect_to(@project) }<br />&nbsp; &nbsp; &nbsp; &nbsp; format.xml&nbsp; { head yikesk }<br />&nbsp; &nbsp; &nbsp; else<br />&nbsp; &nbsp; &nbsp; &nbsp; format.html { render :action =&gt; &quot;edit&quot; }<br />&nbsp; &nbsp; &nbsp; &nbsp; format.xml&nbsp; { render :xml =&gt; @project.errors, :status =&gt; :unprocessable_entity }<br />&nbsp; &nbsp; &nbsp; end<br />&nbsp; &nbsp; end<br />&nbsp; end</p><p>but when I do update it says<br />Unknown action<br />No action responded to 1</p><p>Please let me know what I am doing wrong in update function</p>]]></description>
			<author><![CDATA[dummy@example.com (shaily903)]]></author>
			<pubDate>Mon, 21 Jul 2008 14:29:16 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=69099#p69099</guid>
		</item>
		<item>
			<title><![CDATA[Re: Editing Multiple Models in One Form]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=69073#p69073</link>
			<description><![CDATA[<p>hi</p><p>I am facing the following issue:</p><p>I have two models named: Project and AgreementFile<br />Every Project can have only one agreement file<br />So they share following relationships</p><p>class Project &lt; ActiveRecord::Base<br />&nbsp; belongs_to :agreementfile<br />end</p><p>class Agreementfile &lt; ActiveRecord::Base<br />&nbsp; has_one :project<br />&nbsp; <br />&nbsp; def sow_file=(input_data)<br />&nbsp; &nbsp; self.name = input_data.original_filename<br />&nbsp; &nbsp; self.content_type = input_data.content_type.chomp<br />&nbsp; &nbsp; self.content = input_data.read<br />&nbsp; end</p><p>end</p><br /><p>I want to create agreementfile in the same view as project new<br />New is working for me but edit do not</p><p>In edit.html.erb file of project view I did following</p><p>&lt;h1&gt;Editing project&lt;/h1&gt;</p><p>&lt;%= error_messages_for :project, :agreementfile %&gt;</p><p>&lt;% form_for(:project, @project, :url =&gt; {:action =&gt; &#039;update&#039;}, :html =&gt; { :multipart =&gt; true }) do |f| %&gt;</p><p>&nbsp; &nbsp; &lt;p&gt;<br />&nbsp; &nbsp; &lt;b&gt;Name&lt;/b&gt;&lt;br /&gt;<br />&nbsp; &nbsp; &lt;%= f.text_field :name %&gt;<br />&nbsp; &lt;/p&gt;<br />&nbsp; &nbsp;<br />&nbsp; &lt;p&gt;<br />&nbsp; &nbsp; &lt;b&gt;Budget&lt;/b&gt;&lt;br /&gt;<br />&nbsp; &nbsp; &lt;%= f.text_field&nbsp; :budget %&gt;<br />&nbsp; &lt;/p&gt;</p><p>&nbsp; &lt;p&gt;<br />&nbsp; &nbsp; &lt;b&gt;Billable count&lt;/b&gt;&lt;br /&gt;<br />&nbsp; &nbsp; &lt;%= f.text_field :billable_count %&gt;<br />&nbsp; &lt;/p&gt;<br />&nbsp; &nbsp; </p><p> &lt;% fields_for(:agreementfile, @project.agreementfile) do |i| %&gt;<br />&nbsp; &nbsp; &lt;p&gt;<br />&nbsp; &nbsp; &nbsp; &lt;b&gt;Upload file&lt;/b&gt;<br />&nbsp; &nbsp; &nbsp; &lt;%= i.file_field :sow_file %&gt;<br />&nbsp; &nbsp; &nbsp;&lt;/p&gt;<br />&nbsp; &nbsp;&lt;% end %&gt;</p><p>&nbsp; &lt;p&gt;<br />&nbsp; &nbsp; &lt;%= submit_tag &quot;Update&quot; %&gt;<br />&nbsp; &lt;/p&gt;</p><p>&lt;% end %&gt;</p><p>&lt;%= link_to &#039;Show&#039;, @project %&gt; |<br />&lt;%= link_to &#039;Back&#039;, projects_path %&gt;</p><br /><p>But still I found the view do not show me upload image file name in file_field of corresponding to &quot;Upload file&quot;</p><p>Requirement: During the edit of particular project all the fields corresponding to that project should be pre-filled. User can change the value of any field and click &quot;Update&quot; . The new values should then replace the old values.<br />So the first step itself populating the old values of project in edit form is not working. Please help me how to go about.</p>]]></description>
			<author><![CDATA[dummy@example.com (shaily903)]]></author>
			<pubDate>Mon, 21 Jul 2008 11:09:15 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=69073#p69073</guid>
		</item>
		<item>
			<title><![CDATA[Re: Editing Multiple Models in One Form]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=67126#p67126</link>
			<description><![CDATA[<p>Hi Ryan... an awesome guideline you have painted through this article.</p><p>I am very new to Rails, and have following structure to take care of to update 2 models with one form.</p><p>:user and :user_profile.</p><p>User Model<br />class User &lt; ActiveRecord::Base<br />has_one :user_profile<br />end</p><p>UserProfile Model<br />class UserProfile &lt; ActiveRecord::Base<br />&nbsp; belongs_to :user<br />&nbsp; belongs_to :country<br />&nbsp; belongs_to :community<br />&nbsp; belongs_to :occupation<br />end</p><br /><p>------------------------------The VIEW<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;div&gt;<br />&lt;% form_for :user do |form|%&gt;<br />&nbsp; &lt;%= error_messages_for :user %&gt;<br />&nbsp; &lt;table width=&quot;80%&quot; border=&quot;0&quot; align=&quot;center&quot; cellpadding=&quot;3&quot; cellspacing=&quot;0&quot;&gt;<br />&nbsp; &nbsp; &lt;tr&gt;<br />&nbsp; &nbsp; &lt;td width=&quot;25%&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Maiden&amp;nbsp;Last&amp;nbsp;Name&amp;nbsp;:&lt;/strong&gt;&lt;/td&gt;<br />&nbsp; &nbsp; &lt;td&gt;&lt;%= form.text_field :maiden_last_name %&gt;&lt;/td&gt;<br />&nbsp; &nbsp; &lt;/tr&gt;<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; &lt;tr&gt;<br />&nbsp; &nbsp; &lt;td width=&quot;25%&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Birth Date :&lt;/strong&gt;&lt;/td&gt;<br />&nbsp; &nbsp; &lt;td&gt;&lt;%= form.date_select :birth_date, :start_year =&gt; 1940 %&gt;&lt;/td&gt;<br />&nbsp; &nbsp; &lt;/tr&gt;</p><p>&nbsp; &nbsp; &lt;tr&gt;<br />&nbsp; &nbsp; &lt;td width=&quot;25%&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Maritial Status&lt;/strong&gt;&lt;/td&gt;<br />&nbsp; &nbsp; &lt;td&gt;&lt;%= form.check_box :married %&gt;&lt;/td&gt;<br />&nbsp; &nbsp; &lt;/tr&gt;<br />&nbsp; &nbsp;<br />&nbsp; &nbsp; &lt;tr&gt;<br />&nbsp; &nbsp; &lt;td align=&quot;left&quot;&gt;&lt;strong&gt;Occupation&amp;nbsp:&lt;/strong&gt;&lt;/td&gt;<br />&nbsp; &nbsp; &lt;td&gt;&lt;label&gt;<br />&nbsp; &nbsp; &lt;%=&nbsp; collection_select :user, :occupation_id, Occupation.find(:all), :id, :occupation,&nbsp; &nbsp; {:prompt =&gt; true} %&gt;<br />&nbsp; &nbsp; &nbsp; &lt;/label&gt;&lt;/td&gt;<br />&nbsp; &nbsp; &lt;/tr&gt;</p><p>&nbsp; &nbsp; &nbsp; &lt;tr&gt;<br />&nbsp; &nbsp; &nbsp; &lt;td align=&quot;left&quot;&gt;&lt;strong&gt;Community&amp;nbsp:&lt;/strong&gt;&lt;/td&gt;<br />&nbsp; &nbsp; &nbsp; &lt;td&gt;&lt;label&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp;&lt;%=&nbsp; collection_select :user, :community_id, Community.find(:all), :id, :name, {:prompt =&gt; true} %&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/label&gt;&lt;/td&gt;<br />&nbsp; &nbsp; &lt;/tr&gt;</p><p>&nbsp; &nbsp; &nbsp;&lt;tr&gt;<br />&nbsp; &nbsp; &nbsp;&lt;td width=&quot;25%&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Marriage&amp;nbsp;Anniversary&amp;nbsp;Date&amp;nbsp;:&lt;/strong&gt;&lt;/td&gt;<br />&nbsp; &nbsp; &nbsp;&lt;td&gt;&lt;%= form.date_select :marriage_anniversary_date, :start_year =&gt; 1940 %&gt;&lt;/td&gt;<br />&nbsp; &nbsp; &nbsp;&lt;/tr&gt;<br />&nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp;<br />&lt;tr&gt;<br />&lt;td&gt;&lt;label&gt;<br />&lt;%= submit_tag &quot;Join&quot;, :class =&gt; &quot;button1&quot; %&gt;<br />&lt;/label&gt;&lt;/td&gt;<br />&lt;/tr&gt;<br />&lt;/table&gt;<br />&lt;% end%&gt;<br />&lt;/div&gt;</p><br /><p>#user_controller, tellusmore action is called <br />#with provided :id=&gt;@user.id, from previous page submit<br />...which saves few entries of both &quot;users&quot; and &quot;user_profiles&quot; tables.<br />#-----------------------And this is the Controller<br />def tellusmore<br />&nbsp; &nbsp; if request.post? and params[:user]<br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; @user = User.find(params[:id], :include=&gt;&quot;user_profile&quot;)<br />&nbsp; &nbsp; &nbsp; @user_profile=UserProfile.new<br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; @community = Community.find_by_id(params[:user_profile][:community_id])<br />&nbsp; &nbsp; &nbsp; @user_profile.community_id = @community.id <br />&nbsp; &nbsp; &nbsp; @occupation = Occupation.find_by_id(params[:user_profile][:occupation_id])<br />&nbsp; &nbsp; &nbsp; @user_profile.occupation_id = @occupation.id<br />&nbsp; <br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; @user.user_profile = @user_profile<br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp;if @user.save<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;flash[:notice]= &quot;Step Over&quot; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;redirect_to :action=&gt;&#039;login&#039;<br />&nbsp; &nbsp; &nbsp; &nbsp;else<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;@user.reset_form_password<br />&nbsp; &nbsp; &nbsp; end<br />&nbsp; &nbsp; end<br />&nbsp; end</p><br /><br /><br /><p>&nbsp; &nbsp; Please help me save these entries, into users and user_profiles using the single template.........tellusmore</p><p>Out of these -<br />married, maiden_last_name, birth_date belong to users table rest belongs to user_profiles table.</p>]]></description>
			<author><![CDATA[dummy@example.com (nitinr708)]]></author>
			<pubDate>Wed, 02 Jul 2008 13:15:52 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=67126#p67126</guid>
		</item>
		<item>
			<title><![CDATA[Re: Editing Multiple Models in One Form]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=61810#p61810</link>
			<description><![CDATA[<p>Being a rails newbie this is such great tutorial for me, but in my case I only got 1 task for 1 project, so it&#039;s not project has_many tasks but project has_one task.</p><p>I know from database design point of view this isn&#039;t normalized but this is just a test case for me.</p><p>What should I do with the update method?</p><p>Thank you.</p>]]></description>
			<author><![CDATA[dummy@example.com (williamn)]]></author>
			<pubDate>Fri, 09 May 2008 03:35:09 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=61810#p61810</guid>
		</item>
		<item>
			<title><![CDATA[Re: Editing Multiple Models in One Form]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=39089#p39089</link>
			<description><![CDATA[<p>Does this method work for 3 models?</p><p>I have the following view:<br /><pre name="code" class="ruby:nogutter">&nbsp; &lt;% form_for :question, :url =&gt; { :action =&gt; &#039;create&#039; } do |f| %&gt;<br />&nbsp; &lt;% f.text_field :name %&gt;<br />&nbsp; &lt;% f.text_area :description %&gt;</p><p>&lt;div id=&quot;options&quot;&gt;<br />&nbsp; &lt;label&gt;Options:&lt;/label&gt;<br />&nbsp; &lt;!-- Needs to be ajaxified--&gt;<br />&nbsp; &lt;% question.options.each_with_index do |option, index|%&gt;<br />&nbsp; &nbsp; &lt;% fields_for &quot;options[#{index}]&quot;, option do |f| %&gt;<br />&nbsp; &nbsp; &nbsp; &lt;p&gt;&lt;%= f.text_field :name, :size =&gt; 20 %&gt;&lt;/p&gt;<br />&nbsp; &nbsp; &lt;% end %&gt;<br />&nbsp; &lt;% end %&gt;<br />&lt;/div&gt;<br />&lt;div id=&quot;factors&quot;&gt;<br />&nbsp; &lt;label&gt;Factors:&lt;/label&gt;<br />&nbsp; &lt;!-- Needs to be ajaxified--&gt;<br />&nbsp; &lt;% question.factors.each_with_index do |factor, index|%&gt;<br />&nbsp; &nbsp; &lt;% fields_for &quot;factors[#{index}]&quot;, factor do |f| %&gt;<br />&nbsp; &nbsp; &nbsp; &lt;p&gt;&lt;%= f.text_field :name, :size =&gt; 20 %&gt;&lt;/p&gt;<br />&nbsp; &nbsp; &lt;% end %&gt;<br />&nbsp; &lt;% end %&gt;<br />&lt;/div&gt;</pre><br />Without factors it works fine, but putting factors into the form leads to rails putting both options and factors into the Option model, and neither into the Factor model.</p><p>Any thoughts?</p><p>Thanks</p>]]></description>
			<author><![CDATA[dummy@example.com (potterzot)]]></author>
			<pubDate>Sat, 15 Sep 2007 03:53:04 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=39089#p39089</guid>
		</item>
		<item>
			<title><![CDATA[Re: Editing Multiple Models in One Form]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=37104#p37104</link>
			<description><![CDATA[<p>Eureka! Gold at last!</p><p>Your help has been invaluable.</p><p>Now let&#039;s see if I can do it the right way myself!</p>]]></description>
			<author><![CDATA[dummy@example.com (bchodo)]]></author>
			<pubDate>Wed, 29 Aug 2007 21:58:04 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=37104#p37104</guid>
		</item>
		<item>
			<title><![CDATA[Re: Editing Multiple Models in One Form]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=37101#p37101</link>
			<description><![CDATA[<p>I don&#039;t see why you&#039;re calling comments.build then. This will create a new comment. Try just removing that line and see if everything works.</p>]]></description>
			<author><![CDATA[dummy@example.com (ryanb)]]></author>
			<pubDate>Wed, 29 Aug 2007 21:44:24 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=37101#p37101</guid>
		</item>
		<item>
			<title><![CDATA[Re: Editing Multiple Models in One Form]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=37099#p37099</link>
			<description><![CDATA[<p>No, I create the entity/comments in one form, and edit them in another.</p>]]></description>
			<author><![CDATA[dummy@example.com (bchodo)]]></author>
			<pubDate>Wed, 29 Aug 2007 21:42:28 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=37099#p37099</guid>
		</item>
		<item>
			<title><![CDATA[Re: Editing Multiple Models in One Form]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=37098#p37098</link>
			<description><![CDATA[<p>So you&#039;re trying to create comments and edit them in the same form? This tutorial only supports editing multiple comments. Creating them in the same form is worthy of its own tutorial which someday I may get around to writing...</p>]]></description>
			<author><![CDATA[dummy@example.com (ryanb)]]></author>
			<pubDate>Wed, 29 Aug 2007 21:39:51 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=37098#p37098</guid>
		</item>
		<item>
			<title><![CDATA[Re: Editing Multiple Models in One Form]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=37093#p37093</link>
			<description><![CDATA[<p>My thoughts were that each entity can have multiple comments (the number is not previously known until the Comment model is queried). So the hash representing the group of comments would have to have a set of params for each of the entities&#039; comments in the model. </p><p>I&#039;m just not sure I&#039;m doing it the right way.</p>]]></description>
			<author><![CDATA[dummy@example.com (bchodo)]]></author>
			<pubDate>Wed, 29 Aug 2007 21:12:29 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=37093#p37093</guid>
		</item>
		<item>
			<title><![CDATA[Re: Editing Multiple Models in One Form]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=37088#p37088</link>
			<description><![CDATA[<p>The problem is this line:</p><p><pre name="code" class="ruby:nogutter">@comment = @entity.comments.build(params[:comment])</pre><br />Not sure what you&#039;re doing here, but params[:comment] is a hash of all the other submitted comments. Not just one.</p>]]></description>
			<author><![CDATA[dummy@example.com (ryanb)]]></author>
			<pubDate>Wed, 29 Aug 2007 21:02:12 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=37088#p37088</guid>
		</item>
		<item>
			<title><![CDATA[Re: Editing Multiple Models in One Form]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=37081#p37081</link>
			<description><![CDATA[<p>Could the problem be somewhere around<br />&quot;@entity.comments.each { |c| c.attributes = params[:comment][c.id.to_s]}&quot;? This seems to be about where the &quot;1=&quot; is generated.</p>]]></description>
			<author><![CDATA[dummy@example.com (bchodo)]]></author>
			<pubDate>Wed, 29 Aug 2007 20:48:32 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=37081#p37081</guid>
		</item>
		<item>
			<title><![CDATA[Re: Editing Multiple Models in One Form]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=37064#p37064</link>
			<description><![CDATA[<p>Sure. Full trace follows:<br /><pre name="code" class="ruby:nogutter">D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1857:in `method_missing&#039;<br />D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1672:in `send&#039;<br />D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1672:in `attributes=&#039;<br />D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1671:in `each&#039;<br />D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1671:in `attributes=&#039;<br />D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1505:in `initialize_without_callbacks&#039;<br />D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/callbacks.rb:225:in `initialize&#039;<br />D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/associations/has_many_association.rb:13:in `new&#039;<br />D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/associations/has_many_association.rb:13:in `build&#039;<br />#{RAILS_ROOT}/app/controllers/entity_controller.rb:37:in `update&#039;<br />D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `send&#039;<br />D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `perform_action_without_filters&#039;<br />D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:632:in `call_filter&#039;<br />D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:638:in `call_filter&#039;<br />D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:438:in `call&#039;<br />D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:637:in `call_filter&#039;<br />D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:619:in `perform_action_without_benchmark&#039;<br />D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue&#039;<br />D:/InstantRails/ruby/lib/ruby/1.8/benchmark.rb:293:in `measure&#039;<br />D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue&#039;<br />D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:in `perform_action&#039;<br />D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `send&#039;<br />D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `process_without_filters&#039;<br />D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:624:in `process_without_session_management_support&#039;<br />D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/session_management.rb:114:in `process&#039;<br />D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:330:in `process&#039;<br />D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in `dispatch&#039;<br />D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.0.1-mswin32/lib/mongrel/rails.rb:78:in `process&#039;<br />D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.0.1-mswin32/lib/mongrel/rails.rb:76:in `synchronize&#039;<br />D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.0.1-mswin32/lib/mongrel/rails.rb:76:in `process&#039;<br />D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.0.1-mswin32/lib/mongrel.rb:618:in `process_client&#039;<br />D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.0.1-mswin32/lib/mongrel.rb:617:in `each&#039;<br />D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.0.1-mswin32/lib/mongrel.rb:617:in `process_client&#039;<br />D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.0.1-mswin32/lib/mongrel.rb:736:in `run&#039;<br />D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.0.1-mswin32/lib/mongrel.rb:736:in `initialize&#039;<br />D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.0.1-mswin32/lib/mongrel.rb:736:in `new&#039;<br />D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.0.1-mswin32/lib/mongrel.rb:736:in `run&#039;<br />D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.0.1-mswin32/lib/mongrel.rb:720:in `initialize&#039;<br />D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.0.1-mswin32/lib/mongrel.rb:720:in `new&#039;<br />D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.0.1-mswin32/lib/mongrel.rb:720:in `run&#039;<br />D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.0.1-mswin32/lib/mongrel/configurator.rb:271:in `run&#039;<br />D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.0.1-mswin32/lib/mongrel/configurator.rb:270:in `each&#039;<br />D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.0.1-mswin32/lib/mongrel/configurator.rb:270:in `run&#039;<br />D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.0.1-mswin32/bin/mongrel_rails:127:in `run&#039;<br />D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.0.1-mswin32/lib/mongrel/command.rb:211:in `run&#039;<br />D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.0.1-mswin32/bin/mongrel_rails:243<br />D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load&#039;<br />D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load&#039;<br />D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in&#039;<br />D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load&#039;<br />D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:60<br />D:/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require&#039;<br />D:/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require&#039;<br />D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require&#039;<br />D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in&#039;<br />D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require&#039;<br />D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39<br />D:/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require&#039;<br />D:/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require&#039;<br />script/server:3</pre></p>]]></description>
			<author><![CDATA[dummy@example.com (bchodo)]]></author>
			<pubDate>Wed, 29 Aug 2007 19:18:31 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=37064#p37064</guid>
		</item>
	</channel>
</rss>
