Home What is this referring to?
Reply: 0

What is this referring to?

user666 Published in April 26, 2018, 5:28 pm

From standard Rails installation, in app/assets/javascripts/cable.js:

// Action Cable provides the framework to deal with WebSockets in Rails.
// You can generate new channels where WebSocket features live using the
// `rails generate channel` command.
// = require action_cable
// = require_self
// = require_tree ./channels

(function() {
  this.App || (this.App = {});

  App.cable = ActionCable.createConsumer();

M unclear as to what this is referring to. Also, I get a warning about it being a top-level this

Is there a straightforward way to improve this?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.309977 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO