// yarn add @fullcalendar/core // yarn add @fullcalendar/daygrid import { Controller } from "stimulus" import { Calendar } from '@fullcalendar/core'; import dayGridPlugin from '@fullcalendar/daygrid'; import '@fullcalendar/core/main.css' export default class extends Controller { static targets = ["calendar"] initialize() { } connect() { let calendar = new Calendar(this.calendarTarget, { header: { left: 'prev,next today', center: 'title', right: 'dayGridMonth,dayGridWeek,dayGridDay' }, eventLimit: true, views: { dayGridMonth: { eventLimit: 3 } }, events: '/admin/events.json', plugins: [dayGridPlugin] }) calendar.render(); } disconnect() { } }
@podcast.audio.service_url
instead of url_for(@podcast.audio)
which will be a direct link to the S3 endpoint. However, if you're using a different storage mechanism like disk
in your development environment, it wouldn't work. You may need to have minio
or something similar within your development environment.