<?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: Using Constants in Rails Models</title>
	<atom:link href="http://blog.billeisenhauer.com/2007/08/06/using-constants-in-rails-models/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.billeisenhauer.com/2007/08/06/using-constants-in-rails-models/</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Sat, 06 Mar 2010 16:33:10 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Bill Eisenhauer</title>
		<link>http://blog.billeisenhauer.com/2007/08/06/using-constants-in-rails-models/comment-page-1/#comment-8221</link>
		<dc:creator>Bill Eisenhauer</dc:creator>
		<pubDate>Tue, 16 Oct 2007 12:19:59 +0000</pubDate>
		<guid isPermaLink="false">http://blog.billeisenhauer.com/2007/08/06/using-constants-in-rails-models/#comment-8221</guid>
		<description>Yeah, I&#039;ve had situations where I&#039;ve added a model, then later deleted it, and thus broken the migration when it runs from an early version.  However, you can easily add the model into your migration to fix the migration.

I think this is a matter of style and my preference is still to use model constants in the migration.  It just seems more DRY and adds accuracy to your migration.

Thanks for your feedback!</description>
		<content:encoded><![CDATA[<p>Yeah, I&#8217;ve had situations where I&#8217;ve added a model, then later deleted it, and thus broken the migration when it runs from an early version.  However, you can easily add the model into your migration to fix the migration.</p>
<p>I think this is a matter of style and my preference is still to use model constants in the migration.  It just seems more DRY and adds accuracy to your migration.</p>
<p>Thanks for your feedback!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom-Eric</title>
		<link>http://blog.billeisenhauer.com/2007/08/06/using-constants-in-rails-models/comment-page-1/#comment-8220</link>
		<dc:creator>Tom-Eric</dc:creator>
		<pubDate>Tue, 16 Oct 2007 08:41:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.billeisenhauer.com/2007/08/06/using-constants-in-rails-models/#comment-8220</guid>
		<description>You really shouldn&#039;t use your models in your migrations. It&#039;s now possible to break the migration file by modifying the model. You could solve this by placing the model in your migration file, but I&#039;m not sure if that&#039;s the best solution.</description>
		<content:encoded><![CDATA[<p>You really shouldn&#8217;t use your models in your migrations. It&#8217;s now possible to break the migration file by modifying the model. You could solve this by placing the model in your migration file, but I&#8217;m not sure if that&#8217;s the best solution.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bill Eisenhauer</title>
		<link>http://blog.billeisenhauer.com/2007/08/06/using-constants-in-rails-models/comment-page-1/#comment-6938</link>
		<dc:creator>Bill Eisenhauer</dc:creator>
		<pubDate>Thu, 09 Aug 2007 01:13:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.billeisenhauer.com/2007/08/06/using-constants-in-rails-models/#comment-6938</guid>
		<description>Marcin,

I actually went back to my original code and it was correct there.  This means that it is either being stripped out by CodeRay or that there&#039;s a combination of characters that make the slash not render.

Sorta makes you want to be cautious about the code you lift from a blog, eh?  As always, one should know all of the code they deploy.

Thanks for the tip.

Bill</description>
		<content:encoded><![CDATA[<p>Marcin,</p>
<p>I actually went back to my original code and it was correct there.  This means that it is either being stripped out by CodeRay or that there&#8217;s a combination of characters that make the slash not render.</p>
<p>Sorta makes you want to be cautious about the code you lift from a blog, eh?  As always, one should know all of the code they deploy.</p>
<p>Thanks for the tip.</p>
<p>Bill</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Julian Schrader</title>
		<link>http://blog.billeisenhauer.com/2007/08/06/using-constants-in-rails-models/comment-page-1/#comment-6936</link>
		<dc:creator>Julian Schrader</dc:creator>
		<pubDate>Wed, 08 Aug 2007 21:33:08 +0000</pubDate>
		<guid isPermaLink="false">http://blog.billeisenhauer.com/2007/08/06/using-constants-in-rails-models/#comment-6936</guid>
		<description>Thanks for your great tips!

By the way: GeoKit has helped me a lot building &lt;a href=&quot;http://waschstrasse.info&quot; rel=&quot;nofollow&quot;&gt;Waschstrasse.info&lt;/a&gt;—thanks!</description>
		<content:encoded><![CDATA[<p>Thanks for your great tips!</p>
<p>By the way: GeoKit has helped me a lot building <a href="http://waschstrasse.info" rel="nofollow">Waschstrasse.info</a>—thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marcin Olak</title>
		<link>http://blog.billeisenhauer.com/2007/08/06/using-constants-in-rails-models/comment-page-1/#comment-6931</link>
		<dc:creator>Marcin Olak</dc:creator>
		<pubDate>Wed, 08 Aug 2007 14:28:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.billeisenhauer.com/2007/08/06/using-constants-in-rails-models/#comment-6931</guid>
		<description>From &lt;strong&gt;Programming Ruby&lt;/strong&gt;:

&lt;blockquote cite=&quot;Programming Ruby&quot;&gt;[...] a period (.0) appearing outside brackets represents any character except a newline [...]&lt;/blockquote&gt;

Thus we need a backslash:
&lt;code&gt;
TO_FORMAT = /^[_a-z0-9+.-]+@[_a-z0-9-]+\.[_a-z0-9.-]+$/i
&lt;/code&gt;

I know the code is for demonstration purposes only but still, we don&#039;t want bugs to propagate throughtout the Internet from this magnificent blog :)</description>
		<content:encoded><![CDATA[<p>From <strong>Programming Ruby</strong>:</p>
<blockquote cite="Programming Ruby"><p>[...] a period (.0) appearing outside brackets represents any character except a newline [...]</p></blockquote>
<p>Thus we need a backslash:<br />
<code><br />
TO_FORMAT = /^[_a-z0-9+.-]+@[_a-z0-9-]+\.[_a-z0-9.-]+$/i<br />
</code></p>
<p>I know the code is for demonstration purposes only but still, we don&#8217;t want bugs to propagate throughtout the Internet from this magnificent blog :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marcin Olak</title>
		<link>http://blog.billeisenhauer.com/2007/08/06/using-constants-in-rails-models/comment-page-1/#comment-6916</link>
		<dc:creator>Marcin Olak</dc:creator>
		<pubDate>Tue, 07 Aug 2007 09:22:51 +0000</pubDate>
		<guid isPermaLink="false">http://blog.billeisenhauer.com/2007/08/06/using-constants-in-rails-models/#comment-6916</guid>
		<description>I like this technique. BTW. GeoKit rocks! :)</description>
		<content:encoded><![CDATA[<p>I like this technique. BTW. GeoKit rocks! :)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
