Class: Backend::Cells::MapCellsController

Inherits:
BaseController show all
Defined in:
app/controllers/backend/cells/map_cells_controller.rb

Instance Attribute Summary

Attributes inherited from ApplicationController

#current_theme

Instance Method Summary collapse

Methods inherited from BaseController

account_lettering_states_crit, accounts_range_crit, amount_range_crit, crit_params, journal_entries_states_crit, journal_letter_crit, journal_period_crit, journals_crit, search_conditions

Methods inherited from ApplicationController

#after_sign_in_path_for, #authorized?, human_action_name, #human_action_name, #session_controller?

Instance Method Details

#showObject


4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'app/controllers/backend/cells/map_cells_controller.rb', line 4

def show
  @campaigns = if params[:campaign_ids]
                 Campaign.find(params[:campaign_ids])
               elsif params[:campaign_id]
                 Campaign.find(params[:campaign_id])
               else
                 current_campaign
               end

  @activity_production_ids = params[:activity_production_ids] if params[:activity_production_ids]
  @activity_production_ids = params[:activity_production_id] if params[:activity_production_id]

  @url_params = {
    activity_production_ids: @activity_production_ids,
    campaigns: @campaigns,
    visualization: params[:visualization]
  }

  @activity_productions = (@activity_production_ids ? ActivityProduction.where(id: @activity_production_ids) : ActivityProduction.of_campaign(@campaigns)).where.not(support_shape: nil)
end