Module: RealTimeRails::AR

Defined in:
lib/real_time_rails/ar.rb

Overview

include RealTimeRails:AR in your model for access to realtime updates.

Class Method Summary collapse

Class Method Details

.included(klass) ⇒ Object

after every save send notification to the realtimerails socket server.



6
7
8
9
# File 'lib/real_time_rails/ar.rb', line 6

def self.included(klass)
  klass.send :after_save, :send_rtr_update
  klass.send :after_destroy, :send_rtr_destroy
end