From 14c63c0383b5aa3fe5eabeeb327eeef1abb5aa80 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Fri, 4 Jan 2013 12:02:48 +0100 Subject: [PATCH] Updated attributes to be ignored in hostory observer. --- app/models/observer/history.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/observer/history.rb b/app/models/observer/history.rb index c29e338b4..9da0b63ac 100644 --- a/app/models/observer/history.rb +++ b/app/models/observer/history.rb @@ -60,9 +60,12 @@ class Observer::History < ActiveRecord::Observer } } + # TODO: Swop it to config file later ignore_attributes = { :created_at => true, :updated_at => true, + :created_by_id => true, + :updated_by_id => true, :article_count => true, :create_article_type_id => true, :create_article_sender_id => true, @@ -121,9 +124,6 @@ class Observer::History < ActiveRecord::Observer if attribute_name.scan(/^(.*)_id$/).first attribute_name = attribute_name.scan(/^(.*)_id$/).first.first end -#puts 'LLLLLLLLLLLLLLLLLLLLLLLL' + attribute_name.to_s -# puts '9999999' -# puts current.id History.history_create( :o_id => current.id, :history_type => 'updated',