diff --git a/app/controllers/channels_controller.rb b/app/controllers/channels_controller.rb index 8ecc70f..65f65de 100644 --- a/app/controllers/channels_controller.rb +++ b/app/controllers/channels_controller.rb @@ -154,7 +154,13 @@ class ChannelsController < ApplicationController end def show - @channel = Channel.find(params[:id]) if params[:id] + @channel = Channel.find_by_id(params[:id]) + + # show the public show page if no channel found + if @channel.blank? + @channel = Channel.new(public_flag: false, name: "Channel #{params[:id]}", id: params[:id]) + render "public_show" and return + end @title = @channel.name @domain = domain @@ -609,3 +615,4 @@ class ChannelsController < ApplicationController end end + diff --git a/app/views/channels/_breadcrumb.html.erb b/app/views/channels/_breadcrumb.html.erb index c0ada4d..8bdd7a9 100644 --- a/app/views/channels/_breadcrumb.html.erb +++ b/app/views/channels/_breadcrumb.html.erb @@ -2,6 +2,7 @@ +