Sha256: 8ee629dff6d95295a7cdb9daa20eee3d7d0dba9bd4aec07c0948d9c030b3609e
Contents?: true
Size: 1.2 KB
Versions: 1
Compression:
Stored size: 1.2 KB
Contents
require "rails/engine" module CableReady class Engine < Rails::Engine initializer "cable_ready.sanity_check" do SanityChecker.check! unless Rails.env.production? end initializer "cable_ready.renderer" do ActiveSupport.on_load(:action_controller) do ActionController::Renderers.add :operations do |operations, options| response.content_type ||= Mime[:cable_ready] render json: operations.dispatch end Mime::Type.register "application/vnd.cable-ready.json", :cable_ready end end initializer "cable_ready.assets" do |app| if app.config.respond_to?(:assets) app.config.assets.precompile += %w[ cable_ready.js cable_ready.min.js cable_ready.min.js.map cable_ready.umd.js cable_ready.umd.min.js cable_ready.umd.min.js.map ] end end initializer "cable_ready.importmap", before: "importmap" do |app| if app.config.respond_to?(:importmap) app.config.importmap.paths << Engine.root.join("lib/cable_ready/importmap.rb") app.config.importmap.cache_sweepers << Engine.root.join("app/assets/javascripts") end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
cable_ready-5.0.0.pre9 | lib/cable_ready/engine.rb |