hyper-mesh icon indicating copy to clipboard operation
hyper-mesh copied to clipboard

do_not_synchronize isn't inherited

Open sfcgeorge opened this issue 7 years ago • 3 comments

class ApplicationRecord < ActiveRecord::Base
  do_not_synchronize
end

sfcgeorge avatar Feb 21 '18 22:02 sfcgeorge

its because the internal instance data is not being inherited correctly

catmando avatar Mar 03 '18 18:03 catmando

I have started selectively putting do_not_synchronise in models that don't need to update live, to reduce broadcast traffic. It works fine like that.

Before I was trying to use it in ApplicationRecord to have it inherited but that didn't work. I guess it would be useful to have it be inherited, though it's also easy to patch with included. In fact sticking it in a Concern might work too.

sfcgeorge avatar Mar 03 '18 19:03 sfcgeorge

probably need a way to turn it on and off then i.e. turn it off in ApplicationRecord, but then turn it back in specific modules.

catmando avatar Mar 06 '18 20:03 catmando