12 lines
268 B
Ruby
12 lines
268 B
Ruby
class Mention < ApplicationRecord
|
|
include Notifiable
|
|
|
|
belongs_to :container, polymorphic: true
|
|
belongs_to :mentioner, class_name: "User"
|
|
belongs_to :mentionee, class_name: "User", inverse_of: :mentions
|
|
|
|
def self_mention?
|
|
mentioner == mentionee
|
|
end
|
|
end
|