Created
October 25, 2015 05:43
-
-
Save rickywid/0c1d1e99da2f1bbb4bfc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!!! | |
%html | |
%head | |
%title Mapp | |
= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true | |
= javascript_include_tag 'application', 'data-turbolinks-track' => true | |
= csrf_meta_tags | |
%body | |
= yield | |
:javascript | |
var map; | |
function initMap() { | |
map = new google.maps.Map(document.getElementById('map'), { | |
center: {lat: -34.397, lng: 150.644}, | |
zoom: 8 | |
}); | |
} | |
%script{:async => "", :defer => "", :src => "https://maps.googleapis.com/maps/api/js?key=AIzaSyBdMDyASdvSs-EL3DUXLggdI9WKcZenQKg&callback=initMap"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%h1 home | |
= form_tag users_path, :method => :get do | |
= text_field_tag :search, params[:search] | |
= submit_tag | |
= link_to "new", new_user_path | |
- for user in @users | |
%p | |
= user.name | |
= user.latitude | |
= user.longitude | |
= link_to "show", user_path(user) | |
= link_to "edit", edit_user_path(user) | |
= link_to "delete", user_path(user), method: :delete, data: {confirm: "are you sure"} | |
#map |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment