<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Rails Forum - Ruby on Rails Help and Discussion Forum - NoMethodError on Model's find method]]></title>
		<link>http://railsforum.com/viewtopic.php?id=35472</link>
		<description><![CDATA[The most recent posts in NoMethodError on Model's find method.]]></description>
		<lastBuildDate>Fri, 13 Nov 2009 12:46:08 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: NoMethodError on Model's find method]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=112265#p112265</link>
			<description><![CDATA[<p>You&#039;re right. Thank you!</p>]]></description>
			<author><![CDATA[dummy@example.com (apraditya)]]></author>
			<pubDate>Fri, 13 Nov 2009 12:46:08 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=112265#p112265</guid>
		</item>
		<item>
			<title><![CDATA[Re: NoMethodError on Model's find method]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=112251#p112251</link>
			<description><![CDATA[<p>I think the problem is that you are calling a class method on an object Clan. On any object of Clan type you can call only instance methods, all the finders can be called on self; i.e. Clan.find_method. Tink of it as it is a static method in Java. In your case &#039;self&#039; doesn&#039;t&nbsp; represents Clan class anumore but an object of type Clan. That&#039;s why Rails tries to find an instance method &#039;find_something&#039; and doen&#039;t find it.</p>]]></description>
			<author><![CDATA[dummy@example.com (Javix)]]></author>
			<pubDate>Fri, 13 Nov 2009 08:40:49 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=112251#p112251</guid>
		</item>
		<item>
			<title><![CDATA[NoMethodError on Model's find method]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=112227#p112227</link>
			<description><![CDATA[<p>Hi All,</p><p>I don&#039;t know how this could happen. I got NoMethodError on running a simple Model&#039;s find method. At first i have the same error for running find_all_by_country method where country is one of the model&#039;s attributes. So, running a find method also doesn&#039;t help. I have no problem running the methods on rails console. </p><p>Here&#039;s the pastie <a href="http://pastie.org/694864">http://pastie.org/694864</a> that describe my situation. As you see the console section, flc is a Clan record. I can ran &#039;find_all_by_country&#039; method. However, when i ran the &#039;users_within_country&#039; method, i got NoMethodError on line 2.</p><p>I was suggested to use searchlogic gem on other group and i got similar error</p><div class="codebox"><pre><code>NoMethodError: undefined method `country_equals` for Clan</code></pre></div><p>This is the first time my app running on a frozen rails 2.3.4 on OSX 10.6.2, ruby 1.8.7 p174 (compiled from the source). I tried this app on other ruby versions like: 1.8.7p72 (comes from Snow Leopard DVD), 1.8.6p114 on OpenSuSE and i still have the same error. I&#039;m using frozen Rails 2.3.4. I don&#039;t know what to do now? What should i check? Any suggestion?</p><p>Thanks,<br />Adinda P</p>]]></description>
			<author><![CDATA[dummy@example.com (apraditya)]]></author>
			<pubDate>Fri, 13 Nov 2009 04:01:50 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=112227#p112227</guid>
		</item>
	</channel>
</rss>
