<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Rails Forum - Ruby on Rails Help and Discussion Forum - how to get a value of association of another model in ruby on rails?]]></title>
		<link>http://railsforum.com/viewtopic.php?id=50688</link>
		<description><![CDATA[The most recent posts in how to get a value of association of another model in ruby on rails?.]]></description>
		<lastBuildDate>Tue, 09 Oct 2012 19:41:19 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[how to get a value of association of another model in ruby on rails?]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=156037#p156037</link>
			<description><![CDATA[<p>If i have two models like &#039;Question&#039; and &#039;Answer&#039;. &#039;Question&#039; has three columns like &#039;question_id, question_type, question_text &#039; and &#039;Answer&#039; has three values &#039;answer_id, question_id, answer_text&#039;.</p><p>I am creating form for the &#039;Answer&#039; model.</p><p>Example:</p><p>&lt;%= f.text_field :question_id %&gt;.<br />&lt;%= f.hidden_field :question_id %&gt;.</p><p>Here, I am using the &#039;hidden field&#039; to find the &#039;question_type&#039;. I tried the map method, but that doesn&#039;t work. So Somebody help me to get the &#039;question_type&#039; value by the selection of that &#039;question_id.&#039;</p><p>Thanks</p>]]></description>
			<author><![CDATA[dummy@example.com (Sriganesh)]]></author>
			<pubDate>Tue, 09 Oct 2012 19:41:19 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=156037#p156037</guid>
		</item>
	</channel>
</rss>
