Skip to content

Instantly share code, notes, and snippets.

@codespore
Last active July 9, 2019 19:26
Show Gist options
  • Save codespore/c6a86d1ef6d1eb7d0668706539040b08 to your computer and use it in GitHub Desktop.
Save codespore/c6a86d1ef6d1eb7d0668706539040b08 to your computer and use it in GitHub Desktop.
# config/routes.rb
Rails.application.routes.draw do
get '/calendar', to: 'calendar#index'
root to: 'home#index'
end
# app/javascript/packs/calendar.js
alert('Calendar loaded')
# app/controllers/calendar_controller.rb
class CalendarController < ApplicationController
end
# app/views/calendars/index.html.erb
<h1>Calendar</h1>
<%= javascript_pack_tag 'calendar' %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment