Fix rubocop issues, introduce usage of frozen literal to improve performance

This commit is contained in:
Eugen Rochko
2016-11-15 16:56:29 +01:00
parent a91c3ef6ce
commit fdc17bea58
96 changed files with 329 additions and 126 deletions

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ApplicationCable
class Channel < ActionCable::Channel::Base
protected

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ApplicationCable
class Connection < ActionCable::Connection::Base
identified_by :current_user

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class HashtagChannel < ApplicationCable::Channel
def subscribed
tag = params[:tag].downcase

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class PublicChannel < ApplicationCable::Channel
def subscribed
stream_from 'timeline:public', lambda { |encoded_message|

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class TimelineChannel < ApplicationCable::Channel
def subscribed
stream_from "timeline:#{current_user.account_id}"