<?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"
	>
<channel>
	<title>Comments on: already initialized constant in fixtures</title>
	<atom:link href="http://www.fromdelhi.com/2006/08/21/already-initialized-constant-in-fixtures/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.fromdelhi.com/2006/08/21/already-initialized-constant-in-fixtures/</link>
	<description>Every.Dog has_a :blog</description>
	<pubDate>Wed, 08 Feb 2012 01:56:05 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: Anthony Eden</title>
		<link>http://www.fromdelhi.com/2006/08/21/already-initialized-constant-in-fixtures/#comment-2965</link>
		<dc:creator>Anthony Eden</dc:creator>
		<pubDate>Thu, 08 Mar 2007 16:56:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.fromdelhi.com/2006/08/21/already-initialized-constant-in-fixtures/#comment-2965</guid>
		<description>How about:

SALT &#124;&#124;= "nacl"

Works great in irb.</description>
		<content:encoded><![CDATA[<p>How about:</p>
<p>SALT ||= &#8220;nacl&#8221;</p>
<p>Works great in irb.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sheldon Hearn</title>
		<link>http://www.fromdelhi.com/2006/08/21/already-initialized-constant-in-fixtures/#comment-819</link>
		<dc:creator>Sheldon Hearn</dc:creator>
		<pubDate>Mon, 21 Aug 2006 20:05:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.fromdelhi.com/2006/08/21/already-initialized-constant-in-fixtures/#comment-819</guid>
		<description>This is a common idiom from other areas of your application too, like controllers and models:

SALT = "nacl".freeze unless const_defined? "SALT"

Note the freeze.  The constantness of an object just prevents replacement of that object with another.  Freezing the object ensures its attributes can't be changed.</description>
		<content:encoded><![CDATA[<p>This is a common idiom from other areas of your application too, like controllers and models:</p>
<p>SALT = &#8220;nacl&#8221;.freeze unless const_defined? &#8220;SALT&#8221;</p>
<p>Note the freeze.  The constantness of an object just prevents replacement of that object with another.  Freezing the object ensures its attributes can&#8217;t be changed.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

