You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
383 B

  1. # frozen_string_literal: true
  2. module StyleHelper
  3. def stylesheet_for_layout
  4. if asset_exist? 'custom.css'
  5. 'custom'
  6. else
  7. 'application'
  8. end
  9. end
  10. def asset_exist?(path)
  11. if Rails.configuration.assets.compile
  12. Rails.application.precompiled_assets.include? path
  13. else
  14. Rails.application.assets_manifest.assets[path].present?
  15. end
  16. end
  17. end