1 class MapBugComment < ActiveRecord::Base
3 set_table_name 'map_bug_comment'
5 belongs_to :map_bug, :foreign_key => 'bug_id'
6 belongs_to :user, :foreign_key => 'commenter_id'
8 validates_inclusion_of :event, :in => [ "opened", "closed", "reopened", "commented", "hidden" ]
10 validates_presence_of :id, :on => :update
11 validates_uniqueness_of :id
12 validates_presence_of :visible
13 validates_presence_of :date_created