Class: Tasks::GeographicAreas::UsageController

Inherits:
ApplicationController
  • Object
show all
Includes:
TaskControllerConfiguration
Defined in:
app/controllers/tasks/geographic_areas/usage_controller.rb

Instance Method Summary collapse

Methods included from TaskControllerConfiguration

#set_is_task_controller

Instance Method Details

#indexObject

GET



5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'app/controllers/tasks/geographic_areas/usage_controller.rb', line 5

def index
  if params[:geographic_area_id].present?
    @geogrpahic_areas = GeographicArea.where(id: params[:geographic_area_id])
  else
    @geographic_areas = GeographicArea.all
  end

  if params[:geographic_item_id].present?
    @geographic_item = GeographicItem.find(params[:geographic_item_id])
  else
    @geographic_item = nil
  end
end