comment.rb 195 Bytes Edit Raw Blame History 1 2 3 4 5 6 7 8 9 10 11 12 13 class Comment include Mongoid::Document include Mongoid::Timestamps field :body, :type => String index :user_id belongs_to :err belongs_to :user validates_presence_of :body end