From a1aaa9a89775c0bf1df01056be18b2735ed9499d Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Mon, 30 Sep 2013 02:03:37 +0200 Subject: [PATCH] Removed condition for types. Fetch all history entries. --- app/models/history.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/models/history.rb b/app/models/history.rb index f73314e2c..99de3b235 100644 --- a/app/models/history.rb +++ b/app/models/history.rb @@ -118,18 +118,16 @@ return all history entries of an object history_object = self.object_lookup( requested_object ) history = History.where( :history_object_id => history_object.id ). where( :o_id => requested_object_id ). - where( :history_type_id => History::Type.where( :name => ['created', 'updated', 'notification', 'email', 'added', 'removed'] ) ). order('created_at ASC, id ASC') else history_object_requested = self.object_lookup( requested_object ) history_object_related = self.object_lookup( related_history_object ) history = History.where( - '((history_object_id = ? AND o_id = ?) OR (history_object_id = ? AND related_o_id = ? )) AND history_type_id IN (?)', + '((history_object_id = ? AND o_id = ?) OR (history_object_id = ? AND related_o_id = ? ))', history_object_requested.id, requested_object_id, history_object_related.id, requested_object_id, - History::Type.where( :name => ['created', 'updated', 'notification', 'email', 'added', 'removed'] ) ). order('created_at ASC, id ASC') end