Sha256: c1d4fbae63a376c0f22e83b255f259266967f5c4d6a866da6d04e43d3cfd7b97

Contents?: true

Size: 521 Bytes

Versions: 2

Compression:

Stored size: 521 Bytes

Contents

module ActiveJobChannel
  # An Engine ties us into a Rails app
  # doc: http://guides.rubyonrails.org/engines.html
  class Engine < ::Rails::Engine
    ActiveSupport.on_load(:active_job) do
      require 'active_job_channel/broadcaster'
      ActiveJob::Base.send :extend, ActiveJobChannel::Broadcaster::ClassMethods
    end

    ActiveSupport.on_load(:action_cable) do
      require 'active_job_channel/channel'
    end

    routes.draw do
      mount ActionCable.server => '/cable/active_job_channel'
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
active_job_channel-0.3.0 lib/active_job_channel/engine.rb
active_job_channel-0.0.3 lib/active_job_channel/engine.rb