mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Include changes made to the engine
This commit is contained in:
parent
26bcf81a01
commit
deac988756
1 changed files with 5 additions and 0 deletions
|
@ -19,11 +19,16 @@ module ActionCable
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue