Skip to content

Commit

Permalink
Merge pull request #250 from pabloh/check_for_conf_defined
Browse files Browse the repository at this point in the history
Check that Rails.application is defined before calling
  • Loading branch information
fphilipe committed Apr 6, 2020
2 parents d7b1996 + eb49e5f commit d699563
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/premailer/rails/css_loaders/asset_pipeline_loader.rb
Expand Up @@ -25,6 +25,7 @@ def file_name(url)

def asset_pipeline_present?
defined?(::Rails) &&
::Rails.respond_to?(:application) &&
::Rails.application &&
::Rails.application.respond_to?(:assets_manifest) &&
::Rails.application.assets_manifest
Expand Down

0 comments on commit d699563

Please sign in to comment.