Sha256: 49c92dcce5dbd910f81f4a4c9c541e8856ee7123f9acb152765ebe87dd0faf82
Contents?: true
Size: 980 Bytes
Versions: 3
Compression:
Stored size: 980 Bytes
Contents
# frozen_string_literal: true require "anycable" require "anycable/rails/version" require "anycable/rails/config" module AnyCable # Rails handler for AnyCable module Rails require "anycable/rails/railtie" ADAPTER_ALIASES = %w[any_cable anycable].freeze def self.compatible_adapter?(adapter) ADAPTER_ALIASES.include?(adapter) end end end # Warn if application has been already initialized. # AnyCable should be loaded before initialization in order to work correctly. if defined?(::Rails) && ::Rails.application && ::Rails.application.initialized? puts("\n**************************************************") puts( "⛔️ WARNING: AnyCable loaded after application initialization. Might not work correctly.\n"\ "Please, make sure to remove `require: false` in your Gemfile or "\ "require manually in `environment.rb` before `Rails.application.initialize!`" ) puts("**************************************************\n\n") end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
anycable-rails-0.6.5 | lib/anycable/rails.rb |
anycable-rails-0.6.4 | lib/anycable/rails.rb |
anycable-rails-0.6.3 | lib/anycable/rails.rb |