Skip to content

Commit 4f616f6

Browse files
committed
Allow viewing default informational and promo pages without a host platform configured
Will redirect to setup wizard if any other controlelr is encountered
1 parent 590b59a commit 4f616f6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

app/controllers/better_together/pages_controller.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ module BetterTogether
55
class PagesController < FriendlyResourceController # rubocop:todo Metrics/ClassLength
66
before_action :set_page, only: %i[show edit update destroy]
77

8+
skip_before_action :check_platform_setup, unless: -> { ::BetterTogether::Platform.where(host: true).any? }
9+
810
before_action only: %i[new edit], if: -> { Rails.env.development? } do
911
# Make sure that all BLock subclasses are loaded in dev to generate new block buttons
1012
BetterTogether::Content::Block.load_all_subclasses

0 commit comments

Comments
 (0)