class ActiveRecord::Base
Public Class Methods
no_auto_sync()
click to toggle source
# File lib/syncromesh.rb, line 6 def no_auto_sync @no_auto_sync = true end
scope(name, server, client = nil)
click to toggle source
# File lib/syncromesh.rb, line 12 def scope(name, server, client = nil) if server == :no_sync server = client client = nil elsif client.nil? && @no_auto_sync.nil? client = server end if RUBY_ENGINE == 'opal' && client to_sync name do |scope, model| if ReactiveRecord::SyncWrapper.new(model).instance_eval(&client) scope << model else scope.delete(model) end end end old_scope(name, server) end
Also aliased as: old_scope
Public Instance Methods
syncromesh_after_change()
click to toggle source
# File lib/syncromesh.rb, line 148 def syncromesh_after_change Syncromesh.after_change self end
syncromesh_after_destroy()
click to toggle source
# File lib/syncromesh.rb, line 152 def syncromesh_after_destroy Syncromesh.after_destroy self end