Fix rubocop issues, introduce usage of frozen literal to improve performance
This commit is contained in:
@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module ApplicationCable
|
||||
class Channel < ActionCable::Channel::Base
|
||||
protected
|
||||
|
@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module ApplicationCable
|
||||
class Connection < ActionCable::Connection::Base
|
||||
identified_by :current_user
|
||||
|
@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class HashtagChannel < ApplicationCable::Channel
|
||||
def subscribed
|
||||
tag = params[:tag].downcase
|
||||
|
@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class PublicChannel < ApplicationCable::Channel
|
||||
def subscribed
|
||||
stream_from 'timeline:public', lambda { |encoded_message|
|
||||
|
@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class TimelineChannel < ApplicationCable::Channel
|
||||
def subscribed
|
||||
stream_from "timeline:#{current_user.account_id}"
|
||||
|
Reference in New Issue
Block a user