diff --git a/app/assets/javascripts/places.js b/app/assets/javascripts/places.js index 93f3537..5c9f718 100644 --- a/app/assets/javascripts/places.js +++ b/app/assets/javascripts/places.js @@ -87,12 +87,7 @@ function getCentros(lat, lng, busqueda) { prom.done(onGetMapaSccess); } -function toggleUrgencias(checked) { - if ( checked ) - getCentros(0,0,"urgencias") - else - getCentros() -} + @@ -129,6 +124,13 @@ $(document).ready(function() { }); +function toggleUrgencias(checked) { + if ( checked ) + getCentros(0,0,"urgencias") + else + getCentros() +} + function onMapLocationFound(e){ if (centralmarker != "") { mapa.removeLayer(centralmarker) diff --git a/app/views/places/mapa.html.haml b/app/views/places/mapa.html.haml index cbb47ed..3e1a1be 100644 --- a/app/views/places/mapa.html.haml +++ b/app/views/places/mapa.html.haml @@ -23,7 +23,7 @@ = text_field_tag :pregunta, nil,placeholder: "condones, urgencias o tu direccion dirección" = submit_tag 'Buscar' = check_box_tag "urgencias" - Urgencias + Emergencias #map diff --git a/spec/requests/place_pages_spec.rb b/spec/requests/place_pages_spec.rb index 3178cf8..1cd7443 100644 --- a/spec/requests/place_pages_spec.rb +++ b/spec/requests/place_pages_spec.rb @@ -12,6 +12,6 @@ it { should have_css('div#map') } it { should have_title("#{titulo_base}") } it { should have_field('pregunta')} - it { should have_content('Urgencias')} + it { should have_content('Emergencias')} end end