Skip to content

Commit

Permalink
Default preview controller should not crash with `config.action_contr…
Browse files Browse the repository at this point in the history
…oller.include_all_helpers = false` (fixes #1654)
  • Loading branch information
triskweline committed Jun 14, 2024
1 parent 3376533 commit fde41f6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/controllers/concerns/view_component/preview_actions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ module PreviewActions

# Including helpers here ensures that we're loading the
# latest version of helpers if code-reloading is enabled
helper :all if include_all_helpers
if include_all_helpers
helper :all
else
# Always provide the #view_source helper
helper PreviewHelper
end
end

def index
Expand Down

0 comments on commit fde41f6

Please sign in to comment.