Module: ErrorPagesHelper
- Defined in:
- app/helpers/error_pages_helper.rb
Instance Method Summary collapse
Instance Method Details
#inline_pack_tag(asset) ⇒ Object
2 3 4 5 6 7 8 9 10 |
# File 'app/helpers/error_pages_helper.rb', line 2 def inline_pack_tag(asset) file_path = 'public' + asset_pack_path(asset) content = File.read(file_path) if asset.include?('.js') "<script type='text/javascript'>#{content}</script>".html_safe else "<style type='text/css'>#{content}</style>".html_safe end end |