]>
cat aescling's git repositories - mastodon.git/blob - app/models/mute.rb
1 # frozen_string_literal: true
2 # == Schema Information
6 # id :bigint(8) not null, primary key
7 # created_at :datetime not null
8 # updated_at :datetime not null
9 # hide_notifications :boolean default(TRUE), not null
10 # account_id :bigint(8) not null
11 # target_account_id :bigint(8) not null
14 class Mute
< ApplicationRecord
16 include RelationshipCacheable
19 belongs_to
:target_account, class_name
: 'Account'
21 validates
:account_id, uniqueness
: { scope
: :target_account_id }
23 after_commit
:remove_blocking_cache
27 def remove_blocking_cache
28 Rails
.cache
.delete("exclude_account_ids_for:#{account_id}")
This page took 0.064371 seconds and 4 git commands to generate.