Class: Tasks::GeographicAreas::UsageController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Tasks::GeographicAreas::UsageController
- Includes:
- TaskControllerConfiguration
- Defined in:
- app/controllers/tasks/geographic_areas/usage_controller.rb
Instance Method Summary collapse
-
#index ⇒ Object
GET.
Methods included from TaskControllerConfiguration
Instance Method Details
#index ⇒ Object
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 |