Class: Tasks::Gis::GeographicAreaLookupController

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

Instance Method Summary (collapse)

Methods included from TaskControllerConfiguration

#set_is_task_controller

Instance Method Details

- (Object) has_shape_param (protected)



23
24
25
26
27
28
29
# File 'app/controllers/tasks/gis/geographic_area_lookup_controller.rb', line 23

def has_shape_param
  begin
    true if params.require(:has_shape)
  rescue ActionController::ParameterMissing
    return false 
  end
end

- (Object) index

GET



5
6
# File 'app/controllers/tasks/gis/geographic_area_lookup_controller.rb', line 5

def index
end

- (Object) invert_param (protected)



15
16
17
18
19
20
21
# File 'app/controllers/tasks/gis/geographic_area_lookup_controller.rb', line 15

def invert_param
  begin
    true if params.require(:invert)
  rescue ActionController::ParameterMissing
    return false 
  end
end

- (Object) resolve

GET /tasks/gis/geographic_area_lookup/resolve.js



9
10
11
# File 'app/controllers/tasks/gis/geographic_area_lookup_controller.rb', line 9

def resolve 
  @matches = GeographicArea.matching(params.require(:terms), has_shape_param, invert_param) 
end