<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: Use a partial form with form_for</title>
	<link>http://blog.vixiom.com/2006/10/21/use-a-partial-form-with-form_for/</link>
	<description>The Vixiom Blog :: Flex &#38; Flash on Rails</description>
	<pubDate>Tue,  2 Dec 2008 02:33:55 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.2</generator>
		<item>
		<title>By: Alastair</title>
		<link>http://blog.vixiom.com/2006/10/21/use-a-partial-form-with-form_for/#comment-63536</link>
		<dc:creator>Alastair</dc:creator>
		<pubDate>Wed, 12 Nov 2008 06:23:07 +0000</pubDate>
		<guid>http://blog.vixiom.com/2006/10/21/use-a-partial-form-with-form_for/#comment-63536</guid>
		<description>hey jason, :locals is enabling the partial 'form' to have access to the variable 'f' which is the form_for the model 'product'

so if the model :product has product.name and product.type etc then you can create form elements like

f.text_field :name
f.text_field :type

and they will be bound to the :product model (ie if you are editing a product it's current values will be set in the text inputs)</description>
		<content:encoded><![CDATA[<p>hey jason, :locals is enabling the partial &#8216;form&#8217; to have access to the variable &#8216;f&#8217; which is the form_for the model &#8216;product&#8217;</p>
<p>so if the model :product has product.name and product.type etc then you can create form elements like</p>
<p>f.text_field :name<br />
f.text_field :type</p>
<p>and they will be bound to the :product model (ie if you are editing a product it&#8217;s current values will be set in the text inputs)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason Calleiro</title>
		<link>http://blog.vixiom.com/2006/10/21/use-a-partial-form-with-form_for/#comment-63528</link>
		<dc:creator>Jason Calleiro</dc:creator>
		<pubDate>Wed, 12 Nov 2008 00:04:03 +0000</pubDate>
		<guid>http://blog.vixiom.com/2006/10/21/use-a-partial-form-with-form_for/#comment-63528</guid>
		<description>Im completely new at this whole rails business, and while im really enjoying it im not really getting a lot. I see that this works well, but what is the :locals symbol saying?</description>
		<content:encoded><![CDATA[<p>Im completely new at this whole rails business, and while im really enjoying it im not really getting a lot. I see that this works well, but what is the :locals symbol saying?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Trevor</title>
		<link>http://blog.vixiom.com/2006/10/21/use-a-partial-form-with-form_for/#comment-61540</link>
		<dc:creator>Trevor</dc:creator>
		<pubDate>Mon, 08 Sep 2008 19:16:58 +0000</pubDate>
		<guid>http://blog.vixiom.com/2006/10/21/use-a-partial-form-with-form_for/#comment-61540</guid>
		<description>Awesome, this is a life-saver. Thanks for the post.</description>
		<content:encoded><![CDATA[<p>Awesome, this is a life-saver. Thanks for the post.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott Motte &#187; Blog Archive &#187; How to put a partial form in form_for</title>
		<link>http://blog.vixiom.com/2006/10/21/use-a-partial-form-with-form_for/#comment-59943</link>
		<dc:creator>Scott Motte &#187; Blog Archive &#187; How to put a partial form in form_for</dc:creator>
		<pubDate>Thu, 14 Aug 2008 23:44:22 +0000</pubDate>
		<guid>http://blog.vixiom.com/2006/10/21/use-a-partial-form-with-form_for/#comment-59943</guid>
		<description>[...] This was giving me problems. This solved it. [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] This was giving me problems. This solved it. [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://blog.vixiom.com/2006/10/21/use-a-partial-form-with-form_for/#comment-46114</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Wed, 26 Mar 2008 01:09:40 +0000</pubDate>
		<guid>http://blog.vixiom.com/2006/10/21/use-a-partial-form-with-form_for/#comment-46114</guid>
		<description>Excellent thanks for this tip I was trying to figure out the same thing!

Jason</description>
		<content:encoded><![CDATA[<p>Excellent thanks for this tip I was trying to figure out the same thing!</p>
<p>Jason</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alastair</title>
		<link>http://blog.vixiom.com/2006/10/21/use-a-partial-form-with-form_for/#comment-45019</link>
		<dc:creator>Alastair</dc:creator>
		<pubDate>Thu, 28 Feb 2008 16:34:51 +0000</pubDate>
		<guid>http://blog.vixiom.com/2006/10/21/use-a-partial-form-with-form_for/#comment-45019</guid>
		<description>what about this solution http://www.myersds.com/notebook/2006/09/10/multiple_submit_buttons_on_a_form_with_rails</description>
		<content:encoded><![CDATA[<p>what about this solution <a href="http://www.myersds.com/notebook/2006/09/10/multiple_submit_buttons_on_a_form_with_rails" rel="nofollow">http://www.myersds.com/notebook/2006/09/10/multiple_submit_buttons_on_a_form_with_rails</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: plastik</title>
		<link>http://blog.vixiom.com/2006/10/21/use-a-partial-form-with-form_for/#comment-44995</link>
		<dc:creator>plastik</dc:creator>
		<pubDate>Thu, 28 Feb 2008 13:10:11 +0000</pubDate>
		<guid>http://blog.vixiom.com/2006/10/21/use-a-partial-form-with-form_for/#comment-44995</guid>
		<description>I have a simple form, it has a text_field and a text_area. I want to add
2 submit buttons. Each one will do a different action. I was thinking I
could do form_for, and fields_for, but then I thought that fields_for is
used for having two objects, but I only have one. I know I could just
make them images, and links, but I suck at photoshop, and my boss is one
of those people that feels he is a designer, and he tells me that I have
to have some sort of flashing animated gif that is on the right hand
side, and some link that has to be red over on the left side. He also
told me I have to have two buttons, but I don't know how to do that.</description>
		<content:encoded><![CDATA[<p>I have a simple form, it has a text_field and a text_area. I want to add<br />
2 submit buttons. Each one will do a different action. I was thinking I<br />
could do form_for, and fields_for, but then I thought that fields_for is<br />
used for having two objects, but I only have one. I know I could just<br />
make them images, and links, but I suck at photoshop, and my boss is one<br />
of those people that feels he is a designer, and he tells me that I have<br />
to have some sort of flashing animated gif that is on the right hand<br />
side, and some link that has to be red over on the left side. He also<br />
told me I have to have two buttons, but I don&#8217;t know how to do that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Damian Janowski</title>
		<link>http://blog.vixiom.com/2006/10/21/use-a-partial-form-with-form_for/#comment-41638</link>
		<dc:creator>Damian Janowski</dc:creator>
		<pubDate>Fri, 18 Jan 2008 15:35:27 +0000</pubDate>
		<guid>http://blog.vixiom.com/2006/10/21/use-a-partial-form-with-form_for/#comment-41638</guid>
		<description>We just applied a patch that allows you to do:

 f %&#62;

This will render the _form partial with a local variable called form referencing the FormBuilder.

More info on http://elctech.com/2008/1/16/patching-rails-rendering-form-partials</description>
		<content:encoded><![CDATA[<p>We just applied a patch that allows you to do:</p>
<p> f %&gt;</p>
<p>This will render the _form partial with a local variable called form referencing the FormBuilder.</p>
<p>More info on <a href="http://elctech.com/2008/1/16/patching-rails-rendering-form-partials" rel="nofollow">http://elctech.com/2008/1/16/patching-rails-rendering-form-partials</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Duncan Beevers</title>
		<link>http://blog.vixiom.com/2006/10/21/use-a-partial-form-with-form_for/#comment-27583</link>
		<dc:creator>Duncan Beevers</dc:creator>
		<pubDate>Sat, 16 Jun 2007 01:34:37 +0000</pubDate>
		<guid>http://blog.vixiom.com/2006/10/21/use-a-partial-form-with-form_for/#comment-27583</guid>
		<description>Passing the actual FormBuilder instance as a local is definitely the way to go.</description>
		<content:encoded><![CDATA[<p>Passing the actual FormBuilder instance as a local is definitely the way to go.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wes Bailey</title>
		<link>http://blog.vixiom.com/2006/10/21/use-a-partial-form-with-form_for/#comment-24437</link>
		<dc:creator>Wes Bailey</dc:creator>
		<pubDate>Wed, 16 May 2007 06:37:05 +0000</pubDate>
		<guid>http://blog.vixiom.com/2006/10/21/use-a-partial-form-with-form_for/#comment-24437</guid>
		<description>I like Jun-Dai's comment but the reason I think most people come across this problem is from the rails generated scaffold which produces a form_tag and people learn the magic of form_for and then render partial fails because in its local context it doesn't know about the form.  This post shows how to register the form in the local scope of the partial.

Jun-Dai's comment is really interesting as well because it goes along with the Rails Recipe of cleaning up the controller actions new, create, edit and update and consolidating them into 1 method.</description>
		<content:encoded><![CDATA[<p>I like Jun-Dai&#8217;s comment but the reason I think most people come across this problem is from the rails generated scaffold which produces a form_tag and people learn the magic of form_for and then render partial fails because in its local context it doesn&#8217;t know about the form.  This post shows how to register the form in the local scope of the partial.</p>
<p>Jun-Dai&#8217;s comment is really interesting as well because it goes along with the Rails Recipe of cleaning up the controller actions new, create, edit and update and consolidating them into 1 method.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
