From f840a15bd9d83a84d0b746b4fe60ee8d18d2c6be Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Mon, 7 Apr 2014 08:47:13 +0200 Subject: [PATCH] Changed server event names. --- app/models/application_model.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/application_model.rb b/app/models/application_model.rb index 7fa62b2bb..1976cce15 100644 --- a/app/models/application_model.rb +++ b/app/models/application_model.rb @@ -401,7 +401,7 @@ class OwnModel < ApplicationModel class_name = self.class.name class_name.gsub!(/::/, '') Sessions.broadcast( - :event => class_name + ':created', + :event => class_name + ':create', :data => { :id => self.id, :updated_at => self.updated_at } ) end @@ -429,7 +429,7 @@ class OwnModel < ApplicationModel class_name = self.class.name class_name.gsub!(/::/, '') Sessions.broadcast( - :event => class_name + ':updated', + :event => class_name + ':update', :data => { :id => self.id, :updated_at => self.updated_at } ) end @@ -705,7 +705,7 @@ log object update history with all updated attributes, if configured - will be e value_id[0] = value[0] value_id[1] = value[1] - if self.respond_to?( attribute_name ) + if self.respond_to?( attribute_name ) && self.send(attribute_name) relation_class = self.send(attribute_name).class if relation_class && value_id[0] relation_model = relation_class.lookup( :id => value_id[0] )