diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2017-03-02 18:50:33 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-03-02 18:50:33 +0100 |
commit | 4c0e9f85c5c9e3be91f9a76139fab3b55abbf363 (patch) | |
tree | 9d60c6b37a6adb60b20a674630587de4e55d8765 /app/models/mute.rb | |
parent | 89fc2d7f4810ecdf66b17543f4603c1089a0c3f5 (diff) | |
parent | c64a1c25c4e9a07c694863a38334ed66e368752e (diff) |
Merge branch 'KitRedgrave-add-mute-button'
Diffstat (limited to 'app/models/mute.rb')
-rw-r--r-- | app/models/mute.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/models/mute.rb b/app/models/mute.rb new file mode 100644 index 000000000..a5b334c85 --- /dev/null +++ b/app/models/mute.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +class Mute < ApplicationRecord + include Paginable + + belongs_to :account + belongs_to :target_account, class_name: 'Account' + + validates :account, :target_account, presence: true + validates :account_id, uniqueness: { scope: :target_account_id } +end |