Sha256: 666e9dea32d7f8b155da8a87ed99c70a14e90d49d097031be2a1acb4874ea9d5
Contents?: true
Size: 996 Bytes
Versions: 60
Compression:
Stored size: 996 Bytes
Contents
# frozen_string_literal: true module Proscenium NotIncludedError = Class.new(StandardError) module EnsureLoaded def self.included(child) child.class_eval do append_after_action do if request.format.html? && Importer.imported? if Importer.js_imported? raise NotIncludedError, 'There are side loaded javascripts to be included, but ' \ 'they have not been included in the page. Did you forget ' \ 'to add the `#include_assets` helper in your views?' end if Importer.css_imported? raise NotIncludedError, 'There are side loaded stylesheets to be included, but ' \ 'they have not been included in the page. Did you forget ' \ 'to add the `#include_assets` helper in your views?' end end end end end end end
Version data entries
60 entries across 60 versions & 1 rubygems