[82153] branches/gsoc11-statistics/stats-server/app/models/category.rb

derek at macports.org derek at macports.org
Mon Aug 8 19:54:35 PDT 2011


Revision: 82153
          http://trac.macports.org/changeset/82153
Author:   derek at macports.org
Date:     2011-08-08 19:54:35 -0700 (Mon, 08 Aug 2011)
Log Message:
-----------
Validate presence of category name

Modified Paths:
--------------
    branches/gsoc11-statistics/stats-server/app/models/category.rb

Modified: branches/gsoc11-statistics/stats-server/app/models/category.rb
===================================================================
--- branches/gsoc11-statistics/stats-server/app/models/category.rb	2011-08-09 02:50:45 UTC (rev 82152)
+++ branches/gsoc11-statistics/stats-server/app/models/category.rb	2011-08-09 02:54:35 UTC (rev 82153)
@@ -1,3 +1,5 @@
 class Category < ActiveRecord::Base
   has_many :ports
+  
+  validates_presence_of :name
 end
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110808/c308e0b4/attachment.html>


More information about the macports-changes mailing list