We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9633029 commit fe457d3Copy full SHA for fe457d3
app/controllers/better_together/pages_controller.rb
@@ -5,6 +5,11 @@ module BetterTogether
5
class PagesController < FriendlyResourceController
6
before_action :set_page, only: %i[show edit update destroy]
7
8
+ before_action only: %i[new edit], if: -> { Rails.env.development? } do
9
+ # Make sure that all BLock subclasses are loaded in dev to generate new block buttons
10
+ BetterTogether::Content::Block.load_all_subclasses
11
+ end
12
+
13
def index
14
authorize resource_class
15
@pages = policy_scope(resource_class.with_translations)
0 commit comments