Commit 5b598267cc50b1477dec81cabdd15bad72b55f6e

Authored by AntonioTerceiro
1 parent 2744beda

ActionItem392: updating rails limitation: 2.0.2 also does not support

validates_numericality with virtual attributes


git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1798 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing 1 changed file with 2 additions and 2 deletions   Show diff stats
app/models/rss_feed.rb
... ... @@ -22,9 +22,9 @@ class RssFeed < Article
22 22 settings[:limit] = value
23 23 end
24 24  
25   - # FIXME this should be validates_numericality_of, but Rails 1.2.6 does not
  25 + # FIXME this should be validates_numericality_of, but Rails 2.0.2 does not
26 26 # support validates_numericality_of with virtual attributes
27   - validates_format_of :limit, :with => /^[0-9]+$/, :if => :limit
  27 + validates_format_of :limit, :with => /^\d+$/, :if => :limit
28 28  
29 29 # determinates what to include in the feed. Possible values are +:all+
30 30 # (include everything from the profile) and :parent_and_children (include
... ...