Skip to content

Commit

Permalink
Only include URL helpers if app is loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
boardfish committed Jun 21, 2023
1 parent 85814e0 commit e4268dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/view_component/preview.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

module ViewComponent # :nodoc:
class Preview
include Rails.application.routes.url_helpers
include Rails.application.routes.url_helpers if Rails && Rails.application.present?
include ActionView::Helpers::TagHelper
include ActionView::Helpers::AssetTagHelper
extend ActiveSupport::DescendantsTracker
Expand Down

0 comments on commit e4268dc

Please sign in to comment.