Improved debugging messages.

This commit is contained in:
Martin Edenhofer 2012-11-07 17:17:51 +01:00
parent 56760053f9
commit 3525ad79a9

View file

@ -3,7 +3,7 @@ class HistoryObserver < ActiveRecord::Observer
observe :ticket, :user, 'ticket::_article' observe :ticket, :user, 'ticket::_article'
def after_create(record) def after_create(record)
puts "HISTORY OBSERVER, object created #{ record.class.name }(#{ record.id })" puts "HISTORY OBSERVER, object created #{ record.class.name }.find(#{ record.id })"
# puts record.inspect # puts record.inspect
related_o_id = nil related_o_id = nil
related_history_object_id = nil related_history_object_id = nil
@ -30,7 +30,7 @@ class HistoryObserver < ActiveRecord::Observer
return return
end end
puts "HISTORY OBSERVER object will be updated #{ record.class.name.to_s}(#{ current.id.to_s })" puts "HISTORY OBSERVER, object will be updated #{ record.class.name.to_s}.find(#{ current.id.to_s })"
# puts 'current' # puts 'current'
# puts current.inspect # puts current.inspect
# puts 'record' # puts 'record'