From 3eaf8dbe9ffa2d40c653dbf5f56424f953375a96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Salvador=20P=C3=A9rez=20Garc=C3=ADa?= Date: Fri, 22 Jun 2018 17:44:46 +0200 Subject: [PATCH] Fixed redundant scope condition Redundant scope condition found in Proposal.created_by scope. It has been removed. --- app/models/proposal.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/proposal.rb b/app/models/proposal.rb index 488ffced4..53b97bfea 100644 --- a/app/models/proposal.rb +++ b/app/models/proposal.rb @@ -75,7 +75,7 @@ class Proposal < ActiveRecord::Base scope :not_supported_by_user, ->(user) { where.not(id: user.find_voted_items(votable_type: "Proposal").compact.map(&:id)) } scope :published, -> { where.not(published_at: nil) } scope :draft, -> { where(published_at: nil) } - scope :created_by, ->(author) { unscoped.where(hidden_at: nil, author: author) } + scope :created_by, ->(author) { where(author: author) } def url proposal_path(self)