Remove unused legislation proposals map action

The only view that linked to this action was never used and so it was
deleted in commit 0bacd5baf.

Since now the proposals controller is the only one place rendering the
`shared/map` partial, we're moving it to the proposals views.
This commit is contained in:
Javi Martín
2023-03-06 17:15:15 +01:00
parent 2f8717aa52
commit b0b7d0f25b
8 changed files with 59 additions and 62 deletions

View File

@@ -68,11 +68,6 @@ module CommentableActions
end
end
def map
@resource = resource_model.new
@tag_cloud = tag_cloud
end
private
def track_event

View File

@@ -3,10 +3,10 @@ class Legislation::ProposalsController < Legislation::BaseController
include FlagActions
include ImageAttributes
before_action :load_categories, only: [:new, :create, :edit, :map, :summary]
before_action :load_geozones, only: [:edit, :map, :summary]
before_action :load_categories, only: [:new, :create, :edit, :summary]
before_action :load_geozones, only: [:edit, :summary]
before_action :authenticate_user!, except: [:show, :map, :summary]
before_action :authenticate_user!, except: [:show, :summary]
load_and_authorize_resource :process, class: "Legislation::Process"
load_and_authorize_resource :proposal, class: "Legislation::Proposal", through: :process

View File

@@ -77,6 +77,11 @@ class ProposalsController < ApplicationController
@tag_cloud = tag_cloud
end
def map
@proposal = Proposal.new
@tag_cloud = tag_cloud
end
def disable_recommendations
if current_user.update(recommended_proposals: false)
redirect_to proposals_path, notice: t("proposals.index.recommendations.actions.success")