aboutsummaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorhellekin <hellekin@cepheide.org>2020-11-11 22:27:18 +0100
committerhellekin <hellekin@cepheide.org>2020-11-11 22:27:18 +0100
commitb6aeac4d9274f17e748efb3715aa08f4b7c361f2 (patch)
tree30982cb6ca6b0febc5687580313d9f31d085d7cf /app/controllers
parent2d17bcf4d599f390bce4898a407aef1a4e7454dc (diff)
downloadincommon-map-b6aeac4d9274f17e748efb3715aa08f4b7c361f2.tar.gz
Add map support
This commit creates a dedicated Map model and moves the JavaScript from view to a Stimulus controller. - Stimulus.js https://stimulusjs.org - Leaflet.js https://leafletjs.org Upcoming resources: - https://discourse.stimulusjs.org/t/leafletjs-with-stimulusjs-on-rails-6/1343/4 - https://github.com/ghybs/leaflet-defaulticon-compatibility
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/welcome_controller.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/controllers/welcome_controller.rb b/app/controllers/welcome_controller.rb
index 0c41e5a..ee76eb6 100644
--- a/app/controllers/welcome_controller.rb
+++ b/app/controllers/welcome_controller.rb
@@ -1,6 +1,7 @@
class WelcomeController < ApplicationController
# GET /
def index
+ @map = Map.first
@resources = Resource.order(:uuid).page params[:page]
Rails.logger.info "WECLOME ///// #{@resources&.count || 0}"
end