guoren/app/models/message.rb

5 lines
177 B
Ruby
Raw Permalink Normal View History

2016-12-22 20:00:08 +08:00
class Message < ApplicationRecord
belongs_to :sender, class_name: 'User', foreign_key: 'send_user'
belongs_to :reciever, class_name: 'User', foreign_key: 'recieve_user'
end