summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-16 17:14:12 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-16 17:14:12 +0100
commit0d5fd7ba5092b4d00826f3572448bb54ac2ec983 (patch)
treef0ae9e18e22aca089edb8589168044434e26da5e /app/controllers
parent1323fbad97fcbcf0984e03dcb9acb6a07f3e0905 (diff)
Limit call_histories to 1000 and add caching.
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/call_histories_controller.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/controllers/call_histories_controller.rb b/app/controllers/call_histories_controller.rb
index f711f34..5335ed3 100644
--- a/app/controllers/call_histories_controller.rb
+++ b/app/controllers/call_histories_controller.rb
@@ -34,6 +34,8 @@ class CallHistoriesController < ApplicationController
if ! @type.blank?
@call_histories = @call_histories.where(:entry_type => @type)
end
+
+ @call_histories = @call_histories.order(:created_at).reverse_order.limit(1000)
end