aboutsummaryrefslogtreecommitdiff
path: root/app/helpers/application_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers/application_helper.rb')
-rw-r--r--app/helpers/application_helper.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 0b22f4b..aa3a8d7 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -7,4 +7,18 @@ module ApplicationHelper
current_agency.send(:"#{role}?")
end
end
+
+ def map_container(map = Map.first)
+ raw tag.div(
+ tag.div(id: 'map',
+ data: {
+ target: 'map.container'
+ }),
+ data: {
+ controller: 'map',
+ 'map-latitude': map.latitude,
+ 'map-longitude': map.longitude,
+ 'map-zoom': map.zoom
+ })
+ end
end