From 060284f45e7bea2969686d4d96b399f5f4a3b691 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Tue, 7 Jul 2015 22:28:02 +0200 Subject: Identifiers will add attr_accessor as well for convenience --- lib/action_cable/connection/identification.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/action_cable/connection/identification.rb b/lib/action_cable/connection/identification.rb index 246636198b..6c2af04663 100644 --- a/lib/action_cable/connection/identification.rb +++ b/lib/action_cable/connection/identification.rb @@ -10,7 +10,8 @@ module ActionCable class_methods do def identified_by(*identifiers) - self.identifiers += identifiers + Array(identifiers).each { |identifier| attr_accessor identifier } + self.identifiers += identifiers end end -- cgit v1.2.3