<?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 for Handy Patriawan's Blog</title>
	<atom:link href="http://galaxyelf.com/blog/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://galaxyelf.com/blog</link>
	<description>Technology, Learning, and Everything Else</description>
	<pubDate>Tue, 06 Jan 2009 03:27:39 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>Comment on Ruby on Rails: NoMethodError in Controller#action - Undefined method &#8216;each&#8217; by Handy</title>
		<link>http://galaxyelf.com/blog/2007/11/27/ruby-on-rails-nomethoderror-in-controlleraction-undefined-method-each/#comment-8251</link>
		<dc:creator>Handy</dc:creator>
		<pubDate>Sun, 04 Jan 2009 04:28:27 +0000</pubDate>
		<guid isPermaLink="false">http://galaxyelf.com/blog/2007/11/26/ruby-on-rails-nomethoderror-in-modelaction-undefined-method-each/#comment-8251</guid>
		<description>You're welcome. :)
I'm glad my post helped you.

I'm trying to post the problems and the solutions in this blog. :)</description>
		<content:encoded><![CDATA[<p>You&#8217;re welcome. <img src='http://galaxyelf.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
I&#8217;m glad my post helped you.</p>
<p>I&#8217;m trying to post the problems and the solutions in this blog. <img src='http://galaxyelf.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Ruby on Rails: NoMethodError in Controller#action - Undefined method &#8216;each&#8217; by fididle</title>
		<link>http://galaxyelf.com/blog/2007/11/27/ruby-on-rails-nomethoderror-in-controlleraction-undefined-method-each/#comment-8249</link>
		<dc:creator>fididle</dc:creator>
		<pubDate>Sat, 03 Jan 2009 20:07:21 +0000</pubDate>
		<guid isPermaLink="false">http://galaxyelf.com/blog/2007/11/26/ruby-on-rails-nomethoderror-in-modelaction-undefined-method-each/#comment-8249</guid>
		<description>Thanks. This helped me to.

I was seeing a similar NoMethodError with

  @examples = example.find(:first) 

in the controller, which resulted 
in the following SQL (see your web server console output):

   SELECT * FROM `examples` LIMIT 1

Apparently the corresponding "each" method in my views/index.html.erb file
(below) doesn't work on a single record. 

  % @examples.each do &#124;c&#124; %&#62;
     'show' } %&#62;
  

When I changed the contoller method to:

  @examples = example.find(:all)

The LIMIT 1 was no longer in the SQL query:

    SELECT * FROM `examples`

And "each" worked.</description>
		<content:encoded><![CDATA[<p>Thanks. This helped me to.</p>
<p>I was seeing a similar NoMethodError with</p>
<p>  @examples = example.find(:first) </p>
<p>in the controller, which resulted<br />
in the following SQL (see your web server console output):</p>
<p>   SELECT * FROM `examples` LIMIT 1</p>
<p>Apparently the corresponding &#8220;each&#8221; method in my views/index.html.erb file<br />
(below) doesn&#8217;t work on a single record. </p>
<p>  % @examples.each do |c| %&gt;<br />
     &#8217;show&#8217; } %&gt;</p>
<p>When I changed the contoller method to:</p>
<p>  @examples = example.find(:all)</p>
<p>The LIMIT 1 was no longer in the SQL query:</p>
<p>    SELECT * FROM `examples`</p>
<p>And &#8220;each&#8221; worked.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Rails Date Validation - Step by Step by Handy</title>
		<link>http://galaxyelf.com/blog/2008/05/26/rails-date-validation-step-by-step/#comment-6049</link>
		<dc:creator>Handy</dc:creator>
		<pubDate>Sat, 09 Aug 2008 16:20:23 +0000</pubDate>
		<guid isPermaLink="false">http://galaxyelf.com/blog/?p=55#comment-6049</guid>
		<description>Colin,

I can still delete a valid date from my form.

A couple things to check:
- The field value should be empty when the user saves the form. Can you verify that the controller correctly get an empty string from the field?
- Are you sure the date is not protected field?

Handy</description>
		<content:encoded><![CDATA[<p>Colin,</p>
<p>I can still delete a valid date from my form.</p>
<p>A couple things to check:<br />
- The field value should be empty when the user saves the form. Can you verify that the controller correctly get an empty string from the field?<br />
- Are you sure the date is not protected field?</p>
<p>Handy</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Rails Date Validation - Step by Step by Colin Stevens</title>
		<link>http://galaxyelf.com/blog/2008/05/26/rails-date-validation-step-by-step/#comment-6047</link>
		<dc:creator>Colin Stevens</dc:creator>
		<pubDate>Fri, 08 Aug 2008 04:26:11 +0000</pubDate>
		<guid isPermaLink="false">http://galaxyelf.com/blog/?p=55#comment-6047</guid>
		<description>Hi Handy,

One problem i've come across is that it seems impossible to change a date to nil from a valid date once it is set - any ideas ?</description>
		<content:encoded><![CDATA[<p>Hi Handy,</p>
<p>One problem i&#8217;ve come across is that it seems impossible to change a date to nil from a valid date once it is set - any ideas ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Rails Date Validation - Step by Step by Handy</title>
		<link>http://galaxyelf.com/blog/2008/05/26/rails-date-validation-step-by-step/#comment-5829</link>
		<dc:creator>Handy</dc:creator>
		<pubDate>Mon, 21 Jul 2008 02:37:09 +0000</pubDate>
		<guid isPermaLink="false">http://galaxyelf.com/blog/?p=55#comment-5829</guid>
		<description>Cheri,

Interesting idea... I've never thought about doing the embedded calendar since I think the form looks more clean for my project. Different projects have different requirements, correct? :)

The date field is calling calendar_open from public/javascripts/calendar.js.
To show the calendar, you may try to call calendar_open with the same parameters on a hidden date field. When the user clicks on the date, the calendar should update the hidden field, which can be submitted when the user accepts the form.

Let me know if this works and I'll be happy to put a link to your investigation.

Handy</description>
		<content:encoded><![CDATA[<p>Cheri,</p>
<p>Interesting idea&#8230; I&#8217;ve never thought about doing the embedded calendar since I think the form looks more clean for my project. Different projects have different requirements, correct? <img src='http://galaxyelf.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>The date field is calling calendar_open from public/javascripts/calendar.js.<br />
To show the calendar, you may try to call calendar_open with the same parameters on a hidden date field. When the user clicks on the date, the calendar should update the hidden field, which can be submitted when the user accepts the form.</p>
<p>Let me know if this works and I&#8217;ll be happy to put a link to your investigation.</p>
<p>Handy</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Rails Date Validation - Step by Step by Cheri A</title>
		<link>http://galaxyelf.com/blog/2008/05/26/rails-date-validation-step-by-step/#comment-5817</link>
		<dc:creator>Cheri A</dc:creator>
		<pubDate>Sun, 20 Jul 2008 03:29:46 +0000</pubDate>
		<guid isPermaLink="false">http://galaxyelf.com/blog/?p=55#comment-5817</guid>
		<description>Ok, the ruby code did not go through on my previous post.  
I want to embed the calendar in a Rails form using
"form_for @posting do &#124;f&#124;"?

Thanks,
Cheri</description>
		<content:encoded><![CDATA[<p>Ok, the ruby code did not go through on my previous post.<br />
I want to embed the calendar in a Rails form using<br />
&#8220;form_for @posting do |f|&#8221;?</p>
<p>Thanks,<br />
Cheri</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Rails Date Validation - Step by Step by Handy</title>
		<link>http://galaxyelf.com/blog/2008/05/26/rails-date-validation-step-by-step/#comment-5605</link>
		<dc:creator>Handy</dc:creator>
		<pubDate>Tue, 24 Jun 2008 00:09:25 +0000</pubDate>
		<guid isPermaLink="false">http://galaxyelf.com/blog/?p=55#comment-5605</guid>
		<description>John,

This post is used mainly for en-us locale. If you use a different locale, you're correct that ValidatesDateTime.us_date_format = false.

Also, don't forget to change step 5:
ActiveSupport::CoreExtensions::Date::Conversions::DATE_FORMATS.merge!(:default_date =&gt; ‘%m/%d/%Y’)

The default date format for display should be changed as well.

Let me know if you have other question.

Handy</description>
		<content:encoded><![CDATA[<p>John,</p>
<p>This post is used mainly for en-us locale. If you use a different locale, you&#8217;re correct that ValidatesDateTime.us_date_format = false.</p>
<p>Also, don&#8217;t forget to change step 5:<br />
ActiveSupport::CoreExtensions::Date::Conversions::DATE_FORMATS.merge!(:default_date => ‘%m/%d/%Y’)</p>
<p>The default date format for display should be changed as well.</p>
<p>Let me know if you have other question.</p>
<p>Handy</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Rails Date Validation - Step by Step by John McAuley</title>
		<link>http://galaxyelf.com/blog/2008/05/26/rails-date-validation-step-by-step/#comment-5604</link>
		<dc:creator>John McAuley</dc:creator>
		<pubDate>Mon, 23 Jun 2008 15:40:21 +0000</pubDate>
		<guid isPermaLink="false">http://galaxyelf.com/blog/?p=55#comment-5604</guid>
		<description>Handy,

I got all nulls untill I did the following:

ValidatesDateTime.us_date_format = false #use mm/dd/yyyy format

Hey Presto, it worked.

Laters,
j</description>
		<content:encoded><![CDATA[<p>Handy,</p>
<p>I got all nulls untill I did the following:</p>
<p>ValidatesDateTime.us_date_format = false #use mm/dd/yyyy format</p>
<p>Hey Presto, it worked.</p>
<p>Laters,<br />
j</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Rails Date Validation - Step by Step by John McAuley</title>
		<link>http://galaxyelf.com/blog/2008/05/26/rails-date-validation-step-by-step/#comment-5603</link>
		<dc:creator>John McAuley</dc:creator>
		<pubDate>Mon, 23 Jun 2008 14:51:24 +0000</pubDate>
		<guid isPermaLink="false">http://galaxyelf.com/blog/?p=55#comment-5603</guid>
		<description>Hi Handy,

I installed the plugin as a above, instead of downloading it, and the error has disappeared but there are only nulls being writted to the database. Any ideas?

j</description>
		<content:encoded><![CDATA[<p>Hi Handy,</p>
<p>I installed the plugin as a above, instead of downloading it, and the error has disappeared but there are only nulls being writted to the database. Any ideas?</p>
<p>j</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Rails Date Validation - Step by Step by John McAuley</title>
		<link>http://galaxyelf.com/blog/2008/05/26/rails-date-validation-step-by-step/#comment-5602</link>
		<dc:creator>John McAuley</dc:creator>
		<pubDate>Mon, 23 Jun 2008 14:46:51 +0000</pubDate>
		<guid isPermaLink="false">http://galaxyelf.com/blog/?p=55#comment-5602</guid>
		<description>Hi Handy,

Thanks for the great tutorial.  It is really very usefull, however I am getting one error on your implementation.   Whne I place ValidatesDateTime.us_date_format = true #use mm/dd/yyyy format in my model I receive the following error:

uninitialized constant Visit::ValidatesDateTime

Have you any ideas, I'm pulling out my hair!

Thanks again.

j</description>
		<content:encoded><![CDATA[<p>Hi Handy,</p>
<p>Thanks for the great tutorial.  It is really very usefull, however I am getting one error on your implementation.   Whne I place ValidatesDateTime.us_date_format = true #use mm/dd/yyyy format in my model I receive the following error:</p>
<p>uninitialized constant Visit::ValidatesDateTime</p>
<p>Have you any ideas, I&#8217;m pulling out my hair!</p>
<p>Thanks again.</p>
<p>j</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Ruby on Rails: NoMethodError in Controller#action - Undefined method &#8216;each&#8217; by Handy</title>
		<link>http://galaxyelf.com/blog/2007/11/27/ruby-on-rails-nomethoderror-in-controlleraction-undefined-method-each/#comment-5346</link>
		<dc:creator>Handy</dc:creator>
		<pubDate>Thu, 08 May 2008 23:32:03 +0000</pubDate>
		<guid isPermaLink="false">http://galaxyelf.com/blog/2007/11/26/ruby-on-rails-nomethoderror-in-modelaction-undefined-method-each/#comment-5346</guid>
		<description>You're welcome. It's easy to fall into the trap hence I created this post. :)</description>
		<content:encoded><![CDATA[<p>You&#8217;re welcome. It&#8217;s easy to fall into the trap hence I created this post. <img src='http://galaxyelf.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Ruby on Rails: NoMethodError in Controller#action - Undefined method &#8216;each&#8217; by shaun</title>
		<link>http://galaxyelf.com/blog/2007/11/27/ruby-on-rails-nomethoderror-in-controlleraction-undefined-method-each/#comment-5341</link>
		<dc:creator>shaun</dc:creator>
		<pubDate>Thu, 08 May 2008 16:02:14 +0000</pubDate>
		<guid isPermaLink="false">http://galaxyelf.com/blog/2007/11/26/ruby-on-rails-nomethoderror-in-modelaction-undefined-method-each/#comment-5341</guid>
		<description>i can't believe i missed that. Thanks for the post.</description>
		<content:encoded><![CDATA[<p>i can&#8217;t believe i missed that. Thanks for the post.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Switching to a Mac by Handy Patriawan&#8217;s Blog &#187; Blog Archive &#187; Setup and Configure Subversion Repository Server</title>
		<link>http://galaxyelf.com/blog/2006/11/19/switching-to-mac/#comment-4634</link>
		<dc:creator>Handy Patriawan&#8217;s Blog &#187; Blog Archive &#187; Setup and Configure Subversion Repository Server</dc:creator>
		<pubDate>Fri, 07 Mar 2008 07:26:16 +0000</pubDate>
		<guid isPermaLink="false">http://galaxyelf.com/blog/2006/11/19/switching-to-mac/#comment-4634</guid>
		<description>[...] followed Jeff&#8217;s tutorial to have my local svn repository (recall that I am using a Mac and it has Subversion by [...]</description>
		<content:encoded><![CDATA[<p>[...] followed Jeff&#8217;s tutorial to have my local svn repository (recall that I am using a Mac and it has Subversion by [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Use Ruby on Rails to Maintain Database Schema by Handy</title>
		<link>http://galaxyelf.com/blog/2006/11/20/use-ruby-on-rails-to-maintain-database-schema/#comment-4292</link>
		<dc:creator>Handy</dc:creator>
		<pubDate>Sun, 20 Jan 2008 13:15:16 +0000</pubDate>
		<guid isPermaLink="false">http://galaxyelf.com/blog/2006/11/20/use-ruby-on-rails-to-maintain-database-schema/#comment-4292</guid>
		<description>Thank you. :)

I agree with your comments.

I would like to add that using Rails to maintain database schema helps the developers to eliminate that "one more thing" to do.</description>
		<content:encoded><![CDATA[<p>Thank you. <img src='http://galaxyelf.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I agree with your comments.</p>
<p>I would like to add that using Rails to maintain database schema helps the developers to eliminate that &#8220;one more thing&#8221; to do.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Use Ruby on Rails to Maintain Database Schema by Stephen</title>
		<link>http://galaxyelf.com/blog/2006/11/20/use-ruby-on-rails-to-maintain-database-schema/#comment-4288</link>
		<dc:creator>Stephen</dc:creator>
		<pubDate>Sun, 20 Jan 2008 05:19:17 +0000</pubDate>
		<guid isPermaLink="false">http://galaxyelf.com/blog/2006/11/20/use-ruby-on-rails-to-maintain-database-schema/#comment-4288</guid>
		<description>Sweet use of migrations for a non-Rails project.

Migrations are such a clean way to be able to roll database schemas forward and backward, as well as to be able to tie database schema versions with code versions in the code repository.

Projects that don't do this will often have the problem where they can restore a past version of the code, but not have any idea what the corresponding database schema was.</description>
		<content:encoded><![CDATA[<p>Sweet use of migrations for a non-Rails project.</p>
<p>Migrations are such a clean way to be able to roll database schemas forward and backward, as well as to be able to tie database schema versions with code versions in the code repository.</p>
<p>Projects that don&#8217;t do this will often have the problem where they can restore a past version of the code, but not have any idea what the corresponding database schema was.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
