diff --git a/app/channels/conference_channel.rb b/app/channels/conference_channel.rb index d967ed89f3fa02900914f8819712f9a8400ba12e..a1aa7281581286c854ec85ab22c6daa16b1c639b 100644 --- a/app/channels/conference_channel.rb +++ b/app/channels/conference_channel.rb @@ -1,7 +1,7 @@ class ConferenceChannel < ApplicationCable::Channel def subscribed - # conference = Conference.find(params[:id]) - # stream_for conference + conference = Conference.find_by(slug: params[:slug]) + stream_for conference end def unsubscribed diff --git a/app/views/conferences/show.html.erb b/app/views/conferences/show.html.erb index 97ed2bb3fa68b739f6058fba4823dae88ac75a62..e5809a36a762b1227cb592cd61c05ef49021bc78 100644 --- a/app/views/conferences/show.html.erb +++ b/app/views/conferences/show.html.erb @@ -7,7 +7,7 @@ current_time = Time.zone.now.in_time_zone(@conference.time_zone) # current_time = Time.parse(@conference.days.first.strftime("%Y-%m-%d 11:00")) #current_time = @sessions_by_date[@conference.days.first].first.starts_at.advance(minutes: 5) %> -<%= turbo_frame_tag dom_id(@conference) do %> +<%= turbo_stream_from @conference %> <div> <h1 class="text-2xl font-bold my-2"><%= @conference.name %></h1> <p class="text-xs mb-6"> @@ -135,4 +135,3 @@ current_time = Time.zone.now.in_time_zone(@conference.time_zone) </div> <% end %> </div> -<% end %>