diff --git a/app/controllers/concerns/decidim/proposals/proposals_controller_override.rb b/app/controllers/concerns/decidim/proposals/proposals_controller_override.rb deleted file mode 100644 index 08d6ce00e..000000000 --- a/app/controllers/concerns/decidim/proposals/proposals_controller_override.rb +++ /dev/null @@ -1,44 +0,0 @@ -# frozen_string_literal: true - -module Decidim - module Proposals - module ProposalsControllerOverride - extend ActiveSupport::Concern - - included do - def index - if component_settings.participatory_texts_enabled? - @proposals = Decidim::Proposals::Proposal - .where(component: current_component) - .published - .not_hidden - .only_amendables - .includes(:category, :scope, :attachments, :coauthorships) - .order(position: :asc) - render "decidim/proposals/proposals/participatory_texts/participatory_text" - else - @proposals = search - .result - .published - .not_hidden - - @all_geocoded_proposals = @proposals.geocoded - - @proposals = reorder(@proposals) - @proposals = paginate(@proposals) - @proposals = @proposals.includes(:component, :coauthorships, :attachments) - - @voted_proposals = if current_user - ProposalVote.where( - author: current_user, - proposal: @proposals.pluck(:id) - ).pluck(:decidim_proposal_id) - else - [] - end - end - end - end - end - end -end diff --git a/config/initializers/decidim_overrides.rb b/config/initializers/decidim_overrides.rb index f7a46792e..715baea53 100644 --- a/config/initializers/decidim_overrides.rb +++ b/config/initializers/decidim_overrides.rb @@ -26,5 +26,4 @@ Decidim::Forms::QuestionnaireUserAnswers.include(Decidim::Forms::QuestionnaireUserAnswersOverride) Decidim::Proposals::ApplicationHelper.include(Decidim::Proposals::ApplicationHelperOverride) Decidim::Assemblies::AssembliesController.include(Decidim::Assemblies::AssembliesControllerOverride) - Decidim::Proposals::ProposalsController.include(Decidim::Proposals::ProposalsControllerOverride) end diff --git a/spec/lib/overrides_spec.rb b/spec/lib/overrides_spec.rb index 6d53ba854..1e5e90fa2 100644 --- a/spec/lib/overrides_spec.rb +++ b/spec/lib/overrides_spec.rb @@ -117,7 +117,6 @@ { package: "decidim-proposals", files: { - "/app/controllers/decidim/proposals/proposals_controller.rb" => "69420e7f27e1e7cb2688dadcc91017b3", "/app/helpers/decidim/proposals/application_helper.rb" => "c17dd875a166cd0cd3c09b0e596ebef5", "/app/presenters/decidim/proposals/proposal_presenter.rb" => "bbc7cee02125c1f8cf909219e48af337", "/app/views/decidim/proposals/proposals/index.html.erb" => "48b62ae409b6ed736375772946ef2aa9" # remove map from index page