Home What is this referring to?
Reply: 0

What is this referring to?

VisWebsoft
1#
VisWebsoft Published in 2018-01-12 13:38:48Z

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();
}).call(this);

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.302366 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO