From 5588fb4802328a2183f4a55c36d6703ee435f85c Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Mon, 4 Feb 2019 16:22:12 -0800 Subject: Use ES6 short style --- .../lib/rails/generators/channel/templates/javascript/channel.js.tt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'actioncable') diff --git a/actioncable/lib/rails/generators/channel/templates/javascript/channel.js.tt b/actioncable/lib/rails/generators/channel/templates/javascript/channel.js.tt index 33baaa5a22..ddf6b2d79b 100644 --- a/actioncable/lib/rails/generators/channel/templates/javascript/channel.js.tt +++ b/actioncable/lib/rails/generators/channel/templates/javascript/channel.js.tt @@ -1,15 +1,15 @@ import consumer from "./consumer" consumer.subscriptions.create("<%= class_name %>Channel", { - connected: function() { + connected() { // Called when the subscription is ready for use on the server }, - disconnected: function() { + disconnected() { // Called when the subscription has been terminated by the server }, - received: function(data) { + received(data) { // Called when there's incoming data on the websocket for this channel }<%= actions.any? ? ",\n" : '' %> <% actions.each do |action| -%> -- cgit v1.2.3