Class: Tasks::Gis::GeographicAreaLookupController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Tasks::Gis::GeographicAreaLookupController
- Includes:
- TaskControllerConfiguration
- Defined in:
- app/controllers/tasks/gis/geographic_area_lookup_controller.rb
Instance Method Summary collapse
- #has_shape_param ⇒ Object protected
-
#index ⇒ Object
GET.
- #invert_param ⇒ Object protected
-
#resolve ⇒ Object
GET /tasks/gis/geographic_area_lookup/resolve.js.
Methods included from TaskControllerConfiguration
Instance Method Details
#has_shape_param ⇒ Object (protected)
27 28 29 30 31 32 33 |
# File 'app/controllers/tasks/gis/geographic_area_lookup_controller.rb', line 27 def has_shape_param begin true if params.require(:has_shape) rescue ActionController::ParameterMissing return false end end |
#index ⇒ Object
GET
5 6 |
# File 'app/controllers/tasks/gis/geographic_area_lookup_controller.rb', line 5 def index end |
#invert_param ⇒ Object (protected)
19 20 21 22 23 24 25 |
# File 'app/controllers/tasks/gis/geographic_area_lookup_controller.rb', line 19 def invert_param begin true if params.require(:invert) rescue ActionController::ParameterMissing return false end end |
#resolve ⇒ Object
GET /tasks/gis/geographic_area_lookup/resolve.js
9 10 11 12 13 14 15 |
# File 'app/controllers/tasks/gis/geographic_area_lookup_controller.rb', line 9 def resolve begin @matches = GeographicArea.matching(params.require(:terms), has_shape_param, invert_param) rescue ActionController::ParameterMissing @matches = [] end end |