@@ -16,6 +16,7 @@ module Budgets
|
||||
before_action :set_random_seed, only: :index
|
||||
before_action :load_categories, only: [:index, :new, :create]
|
||||
before_action :set_default_budget_filter, only: :index
|
||||
before_action :set_view, only: :index
|
||||
|
||||
skip_authorization_check only: :json_data
|
||||
|
||||
@@ -147,6 +148,10 @@ module Budgets
|
||||
TagCloud.new(Budget::Investment, params[:search])
|
||||
end
|
||||
|
||||
def set_view
|
||||
@view = (params[:view] == "minimal") ? "minimal" : "default"
|
||||
end
|
||||
|
||||
def investments
|
||||
if @current_order == 'random'
|
||||
@investments.apply_filters_and_search(@budget, params, @current_filter)
|
||||
|
||||
@@ -5,6 +5,7 @@ class DebatesController < ApplicationController
|
||||
|
||||
before_action :parse_tag_filter, only: :index
|
||||
before_action :authenticate_user!, except: [:index, :show, :map]
|
||||
before_action :set_view, only: :index
|
||||
|
||||
feature_flag :debates
|
||||
|
||||
@@ -52,4 +53,8 @@ class DebatesController < ApplicationController
|
||||
Debate
|
||||
end
|
||||
|
||||
def set_view
|
||||
@view = (params[:view] == "minimal") ? "minimal" : "default"
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -8,6 +8,7 @@ class ProposalsController < ApplicationController
|
||||
before_action :load_geozones, only: [:edit, :map, :summary]
|
||||
before_action :authenticate_user!, except: [:index, :show, :map, :summary]
|
||||
before_action :destroy_map_location_association, only: :update
|
||||
before_action :set_view, only: :index
|
||||
|
||||
feature_flag :proposals
|
||||
|
||||
@@ -127,6 +128,10 @@ class ProposalsController < ApplicationController
|
||||
end
|
||||
end
|
||||
|
||||
def set_view
|
||||
@view = (params[:view] == "minimal") ? "minimal" : "default"
|
||||
end
|
||||
|
||||
def load_successful_proposals
|
||||
@proposal_successful_exists = Proposal.successful.exists?
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user