<?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: Weirdness and Coolness in Rails</title>
	<atom:link href="http://www.rubygeek.com/2007/07/27/weirdness-and-coolness-in-rails/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rubygeek.com/2007/07/27/weirdness-and-coolness-in-rails/</link>
	<description>Ruby, PHP, Python and Perl</description>
	<pubDate>Thu, 20 Nov 2008 18:00:43 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: nola</title>
		<link>http://www.rubygeek.com/2007/07/27/weirdness-and-coolness-in-rails/#comment-6212</link>
		<dc:creator>nola</dc:creator>
		<pubDate>Fri, 12 Oct 2007 01:17:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.rubygeek.com/2007/07/27/weirdness-and-coolness-in-rails/#comment-6212</guid>
		<description>Thanks.... not sure why I did writer, reader... maybe I forgot about access then. I am learning more and more each day!

Thanks for the tips!</description>
		<content:encoded><![CDATA[<p>Thanks&#8230;. not sure why I did writer, reader&#8230; maybe I forgot about access then. I am learning more and more each day!</p>
<p>Thanks for the tips!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean Stickle</title>
		<link>http://www.rubygeek.com/2007/07/27/weirdness-and-coolness-in-rails/#comment-6208</link>
		<dc:creator>Sean Stickle</dc:creator>
		<pubDate>Thu, 11 Oct 2007 23:49:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.rubygeek.com/2007/07/27/weirdness-and-coolness-in-rails/#comment-6208</guid>
		<description>Oh, I forgot to add:

attr_reader :date_from, :date_to
attr_writer :date_from, :date_to

can be compacted:

attr_accessor :date_from, :date_to

"attr_accessor" combines the reader and writer. You probably already knew that and have some other reason for doing the reader and writer, but I thought I'd mention it, just in case.</description>
		<content:encoded><![CDATA[<p>Oh, I forgot to add:</p>
<p>attr_reader :date_from, :date_to<br />
attr_writer :date_from, :date_to</p>
<p>can be compacted:</p>
<p>attr_accessor :date_from, :date_to</p>
<p>&#8220;attr_accessor&#8221; combines the reader and writer. You probably already knew that and have some other reason for doing the reader and writer, but I thought I&#8217;d mention it, just in case.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean Stickle</title>
		<link>http://www.rubygeek.com/2007/07/27/weirdness-and-coolness-in-rails/#comment-6207</link>
		<dc:creator>Sean Stickle</dc:creator>
		<pubDate>Thu, 11 Oct 2007 23:47:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.rubygeek.com/2007/07/27/weirdness-and-coolness-in-rails/#comment-6207</guid>
		<description>Just as an aside..

  def has_dates?
    (self.date_from &#38;&#38; self.date_to) ? true : false
  end

can be written

  def has_dates?
    self.date_from &#38;&#38; self.date_to
  end

Since the &#38;&#38; resolves the statement to a boolean on its own, without the need for the ? operator. Little more Rubyish to my eyes, anyways.</description>
		<content:encoded><![CDATA[<p>Just as an aside..</p>
<p>  def has_dates?<br />
    (self.date_from &amp;&amp; self.date_to) ? true : false<br />
  end</p>
<p>can be written</p>
<p>  def has_dates?<br />
    self.date_from &amp;&amp; self.date_to<br />
  end</p>
<p>Since the &amp;&amp; resolves the statement to a boolean on its own, without the need for the ? operator. Little more Rubyish to my eyes, anyways.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
