From 9f23443a86ad145c2739ac289e42ac0f13ef0929 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Fri, 28 Jun 2013 15:15:43 +0200 Subject: Limit the searchresult to 20 entries. --- app/controllers/api/v1/phone_book_entries_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app') diff --git a/app/controllers/api/v1/phone_book_entries_controller.rb b/app/controllers/api/v1/phone_book_entries_controller.rb index 7cae5a5..cae3259 100644 --- a/app/controllers/api/v1/phone_book_entries_controller.rb +++ b/app/controllers/api/v1/phone_book_entries_controller.rb @@ -66,7 +66,7 @@ module Api # Let's sort the results and do pagination. # phone_book_entries = phone_book_entries. - order([ :last_name, :first_name, :organization ]) + order([ :last_name, :first_name, :organization ]).limit(20) respond_with phone_book_entries end -- cgit v1.2.3