Skip to content

Commit

Permalink
Use single google maps API key
Browse files Browse the repository at this point in the history
  • Loading branch information
johnf committed Apr 25, 2024
1 parent ff5f69f commit d294c33
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 21 deletions.
2 changes: 0 additions & 2 deletions app/views/layouts/_active_admin.html.haml

This file was deleted.

7 changes: 1 addition & 6 deletions app/views/layouts/application.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,7 @@
= javascript_importmap_tags

%script{ src: 'https://unpkg.com/@googlemaps/markerclusterer/dist/index.min.js', defer: true }
= javascript_include_tag 'maps', defer: true
- if Rails.env.production?
%script{ src: 'https://maps.googleapis.com/maps/api/js?key=AIzaSyAtxUAk_CHTIHR_to5xDCA2kG5YzkVcl4E&callback=initMap&v=weekly', defer: true }
- else
%script{ src: "https://maps.googleapis.com/maps/api/js?key=#{ENV['GOOGLE_MAPS_API_KEY']}&callback=initMap&v=weekly", defer: true }

%script{ src: 'https://maps.googleapis.com/maps/api/js?key=#{ENV['GOOGLE_MAPS_API_KEY'] || 'AIzaSyAtxUAk_CHTIHR_to5xDCA2kG5YzkVcl4E'}&callback=initMap&v=weekly', defer: true }
%script{ src: 'https://browser.sentry-cdn.com/7.55.2/bundle.tracing.min.js', integrity: 'sha384-u0VnF/CCtmgYR2cShUDrGNHOlH3jdsqBHK+yrIo7uqFygjVXak8CMh+/81vtqNBF', crossorigin: 'anonymous' }

-if Rails.env.production?
Expand Down
13 changes: 0 additions & 13 deletions config/initializers/active_admin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -352,19 +352,6 @@
# config.use_webpacker = true
end

module AdminPageLayoutOverride
def build(*args)
# This will be added at the beginning of <head>
within head do
render partial: 'layouts/active_admin'
end

super
end
end

ActiveAdmin::Views::Pages::Base.prepend(AdminPageLayoutOverride)

# https://github.com/paper-trail-gem/paper_trail/blob/master/doc/pt_13_yaml_safe_load.md
::ActiveRecord.yaml_column_permitted_classes = [
::ActiveRecord::Type::Time::Value,
Expand Down

0 comments on commit d294c33

Please sign in to comment.