<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Inside the Web &#187; rails</title>
	<atom:link href="http://webindoors.com/tag/rails/feed/" rel="self" type="application/rss+xml" />
	<link>http://webindoors.com</link>
	<description>[&#34;Web 2.0&#34;, &#34;Ruby&#34;, &#34;RoR&#34;] &#60;&#60; &#34;me&#34;</description>
	<lastBuildDate>Sun, 18 Apr 2010 13:09:07 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>form_for vs form_tag in Rails</title>
		<link>http://webindoors.com/2008/08/21/hello-world/</link>
		<comments>http://webindoors.com/2008/08/21/hello-world/#comments</comments>
		<pubDate>Thu, 21 Aug 2008 11:50:05 +0000</pubDate>
		<dc:creator>Ankur</dc:creator>
				<category><![CDATA[Ruby On Rails]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ror]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://webindoors.com/?p=1</guid>
		<description><![CDATA[Both form_for and form_tag are used to submit the form in
Ruby on Rails. But form_tag just outputs a &#60;form&#62;
tag while form_for gives a means of accessing some wrapped object.
form_for :
we used form_for for a specific model i.e while we need to
create a new row in database. so, form_for perform the standard http post method and [...]]]></description>
			<content:encoded><![CDATA[<p>Both form_for and form_tag are used to submit the form in<br />
Ruby on Rails. But form_tag just outputs a &lt;form&gt;<br />
tag while form_for gives a means of accessing some wrapped object.</p>
<p>form_for :</p>
<p>we used form_for for a specific model i.e while we need to<br />
create a new row in database. so, form_for perform the standard http post method and posses active record objects.</p>
<p>Below is the example for using form_for form helper:<br />
view sourceprint?</p>
<p>&lt;% form_for @client do |f| %&gt;</p>
<p>First name: &lt;%= f.text_field :firstname %&gt;</p>
<p>Last name : &lt;%= f.text_field :lastname %&gt;</p>
<p>Email : &lt;%= f.text_field :email %&gt;</p>
<p>Address : &lt;%= f.text_area :address %&gt;</p>
<p>&lt;% end %&gt;</p>
<p>here we are using f object of model class “Client” to create form input fields</p>
<p>form_tag :</p>
<p>form_tag just creates an form as an normal form. form_for<br />
will perform the standard http post without any model<br />
backed and has normal fields. this is used mainly when<br />
specific things need to be submitted via form</p>
<p>here is the example for using form_tag in ruby on rails:<br />
view sourceprint?</p>
<p>&lt;% form_tag &#8216;/posts&#8217; do -%&gt;</p>
<p>&lt;%= text_field_tag &#8220;post&#8221;, &#8220;firstname&#8221; %&gt;</p>
<p>&lt;% end -%&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://webindoors.com/2008/08/21/hello-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
