Class: App::Views::SearchResults

Inherits:
Naked
  • Object
show all
Defined in:
app/views/search_results.rb

Instance Method Summary collapse

Instance Method Details

#first_latObject


18
19
20
# File 'app/views/search_results.rb', line 18

def first_lat
  @results[0][:lat]
end

#first_lonObject


22
23
24
# File 'app/views/search_results.rb', line 22

def first_lon
  @results[0][:lon]
end

#resultsObject


10
11
12
# File 'app/views/search_results.rb', line 10

def results
  @results.map{ |r| { name: r[:name], lat: r[:lat], lon: r[:lon], description: r[:description], geonameid: r[:geonameid], bbox: r[:bbox], escaped_name: r[:name].gsub(/'/, "") } }
end

#results_tableObject


6
7
8
# File 'app/views/search_results.rb', line 6

def results_table
  ! @results.nil?
end

#search_termObject


14
15
16
# File 'app/views/search_results.rb', line 14

def search_term
  @search_term
end