From 13f5fa55ab304abf63613ea2293f0a750f2e2480 Mon Sep 17 00:00:00 2001 From: Bertocq Date: Mon, 27 Nov 2017 18:37:40 +0100 Subject: [PATCH] Use Relationable concern on Debates, Proposals and Budget Investments --- app/models/budget/investment.rb | 1 + app/models/debate.rb | 1 + app/models/proposal.rb | 1 + 3 files changed, 3 insertions(+) diff --git a/app/models/budget/investment.rb b/app/models/budget/investment.rb index bd3e5b466..173a7fd36 100644 --- a/app/models/budget/investment.rb +++ b/app/models/budget/investment.rb @@ -17,6 +17,7 @@ class Budget acts_as_votable acts_as_paranoid column: :hidden_at include ActsAsParanoidAliases + include Relationable belongs_to :author, -> { with_hidden }, class_name: 'User', foreign_key: 'author_id' belongs_to :heading diff --git a/app/models/debate.rb b/app/models/debate.rb index 65c06345d..e949e8092 100644 --- a/app/models/debate.rb +++ b/app/models/debate.rb @@ -9,6 +9,7 @@ class Debate < ActiveRecord::Base include Filterable include HasPublicAuthor include Graphqlable + include Relationable acts_as_votable acts_as_paranoid column: :hidden_at diff --git a/app/models/proposal.rb b/app/models/proposal.rb index 3b0696d26..aaf5bea87 100644 --- a/app/models/proposal.rb +++ b/app/models/proposal.rb @@ -17,6 +17,7 @@ class Proposal < ActiveRecord::Base max_file_size: 3.megabytes, accepted_content_types: [ "application/pdf" ] include EmbedVideosHelper + include Relationable acts_as_votable acts_as_paranoid column: :hidden_at