diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-07-15 13:34:05 -0500 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-07-15 14:12:24 -0500 |
commit | cf3ec71aa564c7fe47ec79f8dd5f14e3bce0b85c (patch) | |
tree | 49a3356c4177157b377aeca223a7d1c1e2e3dc17 /app/models/chat_account.rb | |
parent | 0a5eba734e6aa6a6e7e8f64b022af8ea129c9f5d (diff) |
local visibility scope, chat scope+tags, unlisted tags
Diffstat (limited to 'app/models/chat_account.rb')
-rw-r--r-- | app/models/chat_account.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/app/models/chat_account.rb b/app/models/chat_account.rb new file mode 100644 index 000000000..41589a395 --- /dev/null +++ b/app/models/chat_account.rb @@ -0,0 +1,17 @@ +# == Schema Information +# +# Table name: chat_accounts +# +# id :bigint(8) not null, primary key +# account_id :bigint(8) not null +# tag_id :bigint(8) not null +# created_at :datetime not null +# updated_at :datetime not null +# + +class ChatAccount < ApplicationRecord + belongs_to :account, inverse_of: :chat_accounts + belongs_to :tag, inverse_of: :chat_accounts + + validates :account_id, uniqueness: { scope: :tag_id } +end |