lib/anycable/rails/compatibility/rubocop/cops/anycable/instance_vars.rb in anycable-rails-1.0.0.preview2 vs lib/anycable/rails/compatibility/rubocop/cops/anycable/instance_vars.rb in anycable-rails-1.0.0.rc1
- old
+ new
@@ -23,10 +23,10 @@
# stream_from post
# end
# end
#
class InstanceVars < RuboCop::Cop::Cop
- MSG = "Channel instance variables are not supported in AnyCable"
+ MSG = "Channel instance variables are not supported in AnyCable. Use `state_attr_accessor` instead"
def on_class(node)
find_nested_ivars(node) do |nested_ivar|
add_offense(nested_ivar)
end