Sha256: 10a088f7df176a28d1e828b6a5ea9ed84133387e0df832df2f6acf1afbd10ce0
Contents?: true
Size: 603 Bytes
Versions: 81
Compression:
Stored size: 603 Bytes
Contents
App.<%= class_name.underscore %> = App.cable.subscriptions.create("<%= class_name %>Channel", { connected: function() { // Called when the subscription is ready for use on the server }, disconnected: function() { // Called when the subscription has been terminated by the server }, received: function(data) { // Called when there's incoming data on the websocket for this channel }<%= actions.any? ? ",\n" : '' %> <% actions.each do |action| -%> <%=action %>: function() { return this.perform('<%= action %>'); }<%= action == actions[-1] ? '' : ",\n" %> <% end -%> });
Version data entries
81 entries across 81 versions & 6 rubygems