diff --git a/app/views/layouts/_active_admin.html.haml b/app/views/layouts/_active_admin.html.haml deleted file mode 100644 index 5391183a..00000000 --- a/app/views/layouts/_active_admin.html.haml +++ /dev/null @@ -1,2 +0,0 @@ -- if Rails.env.production? - = javascript_include_tag 'https://maps.googleapis.com/maps/api/js?key=AIzaSyAtxUAk_CHTIHR_to5xDCA2kG5YzkVcl4E' diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index c1337a30..254ee28e 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -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? diff --git a/config/initializers/active_admin.rb b/config/initializers/active_admin.rb index 6974f508..116b08fc 100644 --- a/config/initializers/active_admin.rb +++ b/config/initializers/active_admin.rb @@ -352,19 +352,6 @@ # config.use_webpacker = true end -module AdminPageLayoutOverride - def build(*args) - # This will be added at the beginning of
- 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,