blob: 25a9fc79c278f2ad7a5c426491cfd5fe66db903d (
plain) (
tree)
|
|
#= require_self
#= require cable/consumer
@Cable =
INTERNAL: <%= ActionCable::INTERNAL.to_json %>
createConsumer: (url = @getConfig("url")) ->
new Cable.Consumer url
getConfig: (name) ->
element = document.head.querySelector("meta[name='action-cable-#{name}']")
element?.getAttribute("content")
|