diff --git a/app/controllers/api/conferences_controller.rb b/app/controllers/api/conferences_controller.rb index 116570c..b33358a 100644 --- a/app/controllers/api/conferences_controller.rb +++ b/app/controllers/api/conferences_controller.rb @@ -3,5 +3,6 @@ class Api::ConferencesController < Api::ApplicationController def index @conferences = Conference.all + fresh_when @conferences end end diff --git a/app/controllers/api/event_types_controller.rb b/app/controllers/api/event_types_controller.rb index 1df244f..58f4b0d 100644 --- a/app/controllers/api/event_types_controller.rb +++ b/app/controllers/api/event_types_controller.rb @@ -5,5 +5,6 @@ class Api::EventTypesController < Api::ApplicationController def index @event_types = current_conference.event_types.includes(:translations) + fresh_when @event_types end end diff --git a/app/controllers/api/halls_controller.rb b/app/controllers/api/halls_controller.rb index e90cabd..7a7d625 100644 --- a/app/controllers/api/halls_controller.rb +++ b/app/controllers/api/halls_controller.rb @@ -5,5 +5,6 @@ class Api::HallsController < Api::ApplicationController def index @halls = current_conference.halls + fresh_when @halls end end diff --git a/app/controllers/api/slots_controller.rb b/app/controllers/api/slots_controller.rb index 4378f83..2ce9dd3 100644 --- a/app/controllers/api/slots_controller.rb +++ b/app/controllers/api/slots_controller.rb @@ -5,5 +5,7 @@ class Api::SlotsController < Api::ApplicationController def index @slots = current_conference.slots + + fresh_when @slots end end diff --git a/app/controllers/api/speakers_controller.rb b/app/controllers/api/speakers_controller.rb index 825653e..128eafe 100644 --- a/app/controllers/api/speakers_controller.rb +++ b/app/controllers/api/speakers_controller.rb @@ -5,5 +5,6 @@ class Api::SpeakersController < Api::ApplicationController def index @speakers = PersonalProfile.joins(user: {participations: {event: :proposition}}).where(events: {id: current_conference.approved_events.pluck(:id)}, conference: current_conference).distinct + fresh_when @speakers end end diff --git a/app/controllers/api/tracks_controller.rb b/app/controllers/api/tracks_controller.rb index fd4ae1a..21ec2f4 100644 --- a/app/controllers/api/tracks_controller.rb +++ b/app/controllers/api/tracks_controller.rb @@ -5,5 +5,6 @@ class Api::TracksController < Api::ApplicationController def index @tracks = current_conference.tracks.includes(:translations) + fresh_when @tracks end end