diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2019-07-28 17:47:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-28 17:47:37 +0200 |
commit | b9b0313c78ca4efcc8cda089c652be0b333aa16a (patch) | |
tree | 7f94dada733b514a2034839c3ca6fb6776487250 /app/models | |
parent | 75f7f9930eb2a6f5c4041ec44fe0aa795c9ec449 (diff) |
Revert "Remove conversation URI (#11423)" (#11424)
This reverts commit 75f7f9930eb2a6f5c4041ec44fe0aa795c9ec449.
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/conversation.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/models/conversation.rb b/app/models/conversation.rb index 37d233f32..4dfaea889 100644 --- a/app/models/conversation.rb +++ b/app/models/conversation.rb @@ -4,10 +4,17 @@ # Table name: conversations # # id :bigint(8) not null, primary key +# uri :string # created_at :datetime not null # updated_at :datetime not null # class Conversation < ApplicationRecord + validates :uri, uniqueness: true, if: :uri? + has_many :statuses + + def local? + uri.nil? + end end |