]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/map_bug_comment.rb
Detabify and tidy up some more of the bugs code
[rails.git] / app / models / map_bug_comment.rb
index 9839cae45af5da54f7cebff72fe30e9a13756678..3b95b1fff5565dfe486f8039f71824670fbbbc3c 100644 (file)
@@ -1,14 +1,12 @@
 class MapBugComment < ActiveRecord::Base
-
   set_table_name 'map_bug_comment'
 
   belongs_to :map_bug, :foreign_key => 'bug_id'
-  
-  
+  belongs_to :user, :foreign_key => 'commenter_id'
 
+  validates_inclusion_of :event, :in => [ "opened", "closed", "reopened", "commented", "hidden" ]
   validates_presence_of :id, :on => :update
   validates_uniqueness_of :id
   validates_presence_of :visible
   validates_presence_of :date_created
-
 end