Sha256: 57b7d9504bb76884b4e73b1968291ee10485434d8b88d72a2e91cf8bf08a426f
Contents?: true
Size: 982 Bytes
Versions: 64
Compression:
Stored size: 982 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 javascripts to be included, but they have ' \ 'not been included in the page. Did you forget to add the ' \ '`#include_javascripts` helper in your views?' end if Importer.css_imported? raise NotIncludedError, 'There are stylesheets to be included, but they have ' \ 'not been included in the page. Did you forget to add the ' \ '`#include_stylesheets` helper in your views?' end end end end end end end
Version data entries
64 entries across 64 versions & 1 rubygems