From 5135d609b774b177d3d3894b176a822d86b73d3c Mon Sep 17 00:00:00 2001 From: Akihiko Odaki Date: Sun, 30 Apr 2017 07:27:31 +0900 Subject: Use PostgreSQL inheritance for blocks and mutes (#2520) --- app/models/account.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app') diff --git a/app/models/account.rb b/app/models/account.rb index 19f8ca365..89710b66c 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -87,11 +87,11 @@ class Account < ApplicationRecord end def block!(other_account) - block_relationships.where(target_account: other_account).first_or_create!(target_account: other_account) + block_relationships.where(target_account: other_account).first_or_create!(target_account: other_account, block: true) end def mute!(other_account) - mute_relationships.where(target_account: other_account).first_or_create!(target_account: other_account) + mute_relationships.where(target_account: other_account).first_or_create!(target_account: other_account, block: false) end def unfollow!(other_account) -- cgit