<?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>Hank Beaver &#187; has_keys?</title>
	<atom:link href="http://www.hankbeaver.com/index.php/tag/has_keys/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.hankbeaver.com</link>
	<description>Open-source, Internet technologist who works for MaxMedia located in Atlanta, GA, USA</description>
	<lastBuildDate>Tue, 09 Aug 2011 18:20:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Calling initialize in ActiveRecord model causes nil.has_keys? error.</title>
		<link>http://www.hankbeaver.com/index.php/2008/09/02/calling-initialize-in-activerecord-model-causes-nilhas_keys-error/</link>
		<comments>http://www.hankbeaver.com/index.php/2008/09/02/calling-initialize-in-activerecord-model-causes-nilhas_keys-error/#comments</comments>
		<pubDate>Tue, 02 Sep 2008 13:24:35 +0000</pubDate>
		<dc:creator>hbeaver</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[has_keys?]]></category>
		<category><![CDATA[model]]></category>

		<guid isPermaLink="false">http://1000fires.com/wordpress/?p=43</guid>
		<description><![CDATA[When instantiating a model class this error occurs:
instance = MyModel.new
NoMethodError: You have a nil object when you didn't expect it!
The error occurred while evaluating nil.has_key?
This is rectified by placing a super within model class.
def initialize
super
logger.debug("initialize VirtualMta: #{self.class}")
end
]]></description>
			<content:encoded><![CDATA[<p>When instantiating a model class this error occurs:</p>
<pre>instance = MyModel.new</pre>
<pre>NoMethodError: You have a nil object when you didn't expect it!</pre>
<pre>The error occurred while evaluating nil.has_key?</pre>
<p>This is rectified by placing a <strong>super</strong> within model class.</p>
<pre>def initialize</pre>
<pre>super</pre>
<pre>logger.debug("initialize VirtualMta: #{self.class}")</pre>
<pre>end</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.hankbeaver.com/index.php/2008/09/02/calling-initialize-in-activerecord-model-causes-nilhas_keys-error/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

