chat_message.rb 204 Bytes Edit Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 class ChatMessage < ApplicationRecord attr_accessible :body, :from, :to belongs_to :to, :class_name => 'Profile' belongs_to :from, :class_name => 'Profile' validates_presence_of :from, :to end