aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable/lib/action_cable
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2015-12-16 15:28:50 +0100
committerDavid Heinemeier Hansson <david@loudthinking.com>2015-12-16 15:28:50 +0100
commit346a7528eff8aabc9618d0b20a32b36f218d8b2f (patch)
tree0b25cf254d2060cc4f3e0fb209590a108c5dab4b /actioncable/lib/action_cable
parent40cc72548f529fbe3a52577dca3d0517f631f1b5 (diff)
downloadrails-346a7528eff8aabc9618d0b20a32b36f218d8b2f.tar.gz
rails-346a7528eff8aabc9618d0b20a32b36f218d8b2f.tar.bz2
rails-346a7528eff8aabc9618d0b20a32b36f218d8b2f.zip
We are using railtie, not engine
Diffstat (limited to 'actioncable/lib/action_cable')
-rw-r--r--actioncable/lib/action_cable/engine.rb36
-rw-r--r--actioncable/lib/action_cable/railtie.rb1
2 files changed, 1 insertions, 36 deletions
diff --git a/actioncable/lib/action_cable/engine.rb b/actioncable/lib/action_cable/engine.rb
deleted file mode 100644
index 6d747d6992..0000000000
--- a/actioncable/lib/action_cable/engine.rb
+++ /dev/null
@@ -1,36 +0,0 @@
-require "rails"
-require "action_cable"
-require "action_cable/helpers/action_cable_helper"
-require "active_support/core_ext/hash/indifferent_access"
-
-module ActionCable
- class Railtie < Rails::Engine # :nodoc:
- config.action_cable = ActiveSupport::OrderedOptions.new
- config.eager_load_namespaces << ActionCable
-
- initializer "action_cable.helpers" do
- ActiveSupport.on_load(:action_view) do
- include ActionCable::Helpers::ActionCableHelper
- end
- end
-
- initializer "action_cable.logger" do
- ActiveSupport.on_load(:action_cable) { self.logger ||= ::Rails.logger }
- end
-
- initializer "action_cable.set_configs" do |app|
- app.paths.add "config/redis/cable", with: "config/redis/cable.yml"
-
- options = app.config.action_cable
-
- options.allowed_request_origins ||= "http://localhost:3000" if ::Rails.env.development?
-
- ActiveSupport.on_load(:action_cable) do
- path = Pathname.new(paths["config/redis/cable"].existent.first)
- self.redis = Rails.application.config_for(redis_path).with_indifferent_access
-
- options.each { |k,v| send("#{k}=", v) }
- end
- end
- end
-end
diff --git a/actioncable/lib/action_cable/railtie.rb b/actioncable/lib/action_cable/railtie.rb
index a1a656f790..d4833eb9e3 100644
--- a/actioncable/lib/action_cable/railtie.rb
+++ b/actioncable/lib/action_cable/railtie.rb
@@ -1,6 +1,7 @@
require "rails"
require "action_cable"
require "action_cable/helpers/action_cable_helper"
+require "active_support/core_ext/hash/indifferent_access"
module ActionCable
class Railtie < Rails::Railtie # :nodoc: