From 0518492158af247f3b99a8f27f4498d1bcc91117 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sun, 12 Feb 2017 00:48:53 +0100 Subject: Stop trying to shoehorn all Salmon updates into the poor database-connected StreamEntry model. Simply render Salmon slaps as they are needed --- app/models/block.rb | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'app/models/block.rb') diff --git a/app/models/block.rb b/app/models/block.rb index d0662b685..9c55703c9 100644 --- a/app/models/block.rb +++ b/app/models/block.rb @@ -2,27 +2,10 @@ class Block < ApplicationRecord include Paginable - include Streamable belongs_to :account belongs_to :target_account, class_name: 'Account' validates :account, :target_account, presence: true validates :account_id, uniqueness: { scope: :target_account_id } - - def verb - destroyed? ? :unblock : :block - end - - def target - target_account - end - - def hidden? - true - end - - def title - destroyed? ? "#{account.acct} is no longer blocking #{target_account.acct}" : "#{account.acct} blocked #{target_account.acct}" - end end -- cgit