From 5b598267cc50b1477dec81cabdd15bad72b55f6e Mon Sep 17 00:00:00 2001 From: AntonioTerceiro Date: Thu, 15 May 2008 20:11:15 +0000 Subject: [PATCH] ActionItem392: updating rails limitation: 2.0.2 also does not support validates_numericality with virtual attributes --- app/models/rss_feed.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/rss_feed.rb b/app/models/rss_feed.rb index 65c7c26..67ac9d2 100644 --- a/app/models/rss_feed.rb +++ b/app/models/rss_feed.rb @@ -22,9 +22,9 @@ class RssFeed < Article settings[:limit] = value end - # FIXME this should be validates_numericality_of, but Rails 1.2.6 does not + # FIXME this should be validates_numericality_of, but Rails 2.0.2 does not # support validates_numericality_of with virtual attributes - validates_format_of :limit, :with => /^[0-9]+$/, :if => :limit + validates_format_of :limit, :with => /^\d+$/, :if => :limit # determinates what to include in the feed. Possible values are +:all+ # (include everything from the profile) and :parent_and_children (include -- libgit2 0.21.2