<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Ruby on Rails: NoMethodError in Controller#action &#8211; Undefined method &#8216;each&#8217;</title>
	<atom:link href="http://galaxyelf.com/blog/2007/11/27/ruby-on-rails-nomethoderror-in-controlleraction-undefined-method-each/feed/" rel="self" type="application/rss+xml" />
	<link>http://galaxyelf.com/blog/2007/11/27/ruby-on-rails-nomethoderror-in-controlleraction-undefined-method-each/</link>
	<description>Technology, Learning, and Everything Else</description>
	<lastBuildDate>Wed, 27 May 2009 11:37:59 -0400</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Handy</title>
		<link>http://galaxyelf.com/blog/2007/11/27/ruby-on-rails-nomethoderror-in-controlleraction-undefined-method-each/comment-page-1/#comment-8251</link>
		<dc:creator>Handy</dc:creator>
		<pubDate>Sun, 04 Jan 2009 04:28:27 +0000</pubDate>
		<guid isPermaLink="false">http://galaxyelf.com/blog/2007/11/26/ruby-on-rails-nomethoderror-in-modelaction-undefined-method-each/#comment-8251</guid>
		<description>You&#039;re welcome. :)
I&#039;m glad my post helped you.

I&#039;m trying to post the problems and the solutions in this blog. :)</description>
		<content:encoded><![CDATA[<p>You&#8217;re welcome. <img src='http://galaxyelf.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
I&#8217;m glad my post helped you.</p>
<p>I&#8217;m trying to post the problems and the solutions in this blog. <img src='http://galaxyelf.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fididle</title>
		<link>http://galaxyelf.com/blog/2007/11/27/ruby-on-rails-nomethoderror-in-controlleraction-undefined-method-each/comment-page-1/#comment-8249</link>
		<dc:creator>fididle</dc:creator>
		<pubDate>Sat, 03 Jan 2009 20:07:21 +0000</pubDate>
		<guid isPermaLink="false">http://galaxyelf.com/blog/2007/11/26/ruby-on-rails-nomethoderror-in-modelaction-undefined-method-each/#comment-8249</guid>
		<description>Thanks. This helped me to.

I was seeing a similar NoMethodError with

  @examples = example.find(:first) 

in the controller, which resulted 
in the following SQL (see your web server console output):

   SELECT * FROM `examples` LIMIT 1

Apparently the corresponding &quot;each&quot; method in my views/index.html.erb file
(below) doesn&#039;t work on a single record. 

  % @examples.each do &#124;c&#124; %&gt;
     &#039;show&#039; } %&gt;
  

When I changed the contoller method to:

  @examples = example.find(:all)

The LIMIT 1 was no longer in the SQL query:

    SELECT * FROM `examples`

And &quot;each&quot; worked.</description>
		<content:encoded><![CDATA[<p>Thanks. This helped me to.</p>
<p>I was seeing a similar NoMethodError with</p>
<p>  @examples = example.find(:first) </p>
<p>in the controller, which resulted<br />
in the following SQL (see your web server console output):</p>
<p>   SELECT * FROM `examples` LIMIT 1</p>
<p>Apparently the corresponding &#8220;each&#8221; method in my views/index.html.erb file<br />
(below) doesn&#8217;t work on a single record. </p>
<p>  % @examples.each do |c| %&gt;<br />
     &#8216;show&#8217; } %&gt;</p>
<p>When I changed the contoller method to:</p>
<p>  @examples = example.find(:all)</p>
<p>The LIMIT 1 was no longer in the SQL query:</p>
<p>    SELECT * FROM `examples`</p>
<p>And &#8220;each&#8221; worked.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Handy</title>
		<link>http://galaxyelf.com/blog/2007/11/27/ruby-on-rails-nomethoderror-in-controlleraction-undefined-method-each/comment-page-1/#comment-5346</link>
		<dc:creator>Handy</dc:creator>
		<pubDate>Thu, 08 May 2008 23:32:03 +0000</pubDate>
		<guid isPermaLink="false">http://galaxyelf.com/blog/2007/11/26/ruby-on-rails-nomethoderror-in-modelaction-undefined-method-each/#comment-5346</guid>
		<description>You&#039;re welcome. It&#039;s easy to fall into the trap hence I created this post. :)</description>
		<content:encoded><![CDATA[<p>You&#8217;re welcome. It&#8217;s easy to fall into the trap hence I created this post. <img src='http://galaxyelf.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shaun</title>
		<link>http://galaxyelf.com/blog/2007/11/27/ruby-on-rails-nomethoderror-in-controlleraction-undefined-method-each/comment-page-1/#comment-5341</link>
		<dc:creator>shaun</dc:creator>
		<pubDate>Thu, 08 May 2008 16:02:14 +0000</pubDate>
		<guid isPermaLink="false">http://galaxyelf.com/blog/2007/11/26/ruby-on-rails-nomethoderror-in-modelaction-undefined-method-each/#comment-5341</guid>
		<description>i can&#039;t believe i missed that. Thanks for the post.</description>
		<content:encoded><![CDATA[<p>i can&#8217;t believe i missed that. Thanks for the post.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
