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:
@@ -68,11 +68,6 @@ module CommentableActions
|
||||
end
|
||||
end
|
||||
|
||||
def map
|
||||
@resource = resource_model.new
|
||||
@tag_cloud = tag_cloud
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def track_event
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user