From 0865fe4a1a9c52c1b9d90467c118d4d40a1ecca4 Mon Sep 17 00:00:00 2001 From: Dane Summers Date: Wed, 31 Aug 2016 08:02:36 -0400 Subject: [PATCH 1/2] Adds support for using a google maps key. --- app/views/layouts/application.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index e78d8cf2a..7f99dc795 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -8,7 +8,7 @@ / HTML5 shim, for IE6-8 support of HTML5 elements /[if lt IE 9] = javascript_include_tag "//html5shim.googlecode.com/svn/trunk/html5.js" - = javascript_include_tag "//maps.google.com/maps/api/js?sensor=false&language=#{I18n.locale}" + = javascript_include_tag "//maps.google.com/maps/api/js?sensor=false&language=#{I18n.locale}&key=#{ENV['GOOGLE_MAP_KEY']}" = javascript_include_tag "//ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js" = javascript_include_tag "//ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js" = javascript_include_tag "application" From 68eb1e4b9b6dc419dd0733fe54c49c2bed0982ca Mon Sep 17 00:00:00 2001 From: Dane Summers Date: Wed, 31 Aug 2016 08:09:59 -0400 Subject: [PATCH 2/2] Adds google api instructions to heroku setup section --- README.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index db64d3891..80811345c 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,15 @@ A successful deployment to Heroku requires a few setup steps: heroku config:set SECRET_TOKEN=the_token_you_generated ``` -3. [Precompile your assets](https://devcenter.heroku.com/articles/rails3x-asset-pipeline-cedar) +3. [Obtain a Google API Key](https://developers.google.com/maps/documentation/javascript/get-api-key). + +4. Set the Google API key: + + ``` + heroku config:set GOOGLE_MAP_KEY=the_token_you_obtained + ``` + +5. [Precompile your assets](https://devcenter.heroku.com/articles/rails3x-asset-pipeline-cedar) ``` RAILS_ENV=production bundle exec rake assets:precompile @@ -60,9 +68,9 @@ A successful deployment to Heroku requires a few setup steps: git commit -m "vendor compiled assets" ``` -4. Add a production database to config/database.yml +6. Add a production database to config/database.yml -5. Seed the production db: +7. Seed the production db: `heroku run bundle exec rake db:seed`