summaryrefslogtreecommitdiff
path: root/app/controllers/assets_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/assets_controller.rb')
-rw-r--r--app/controllers/assets_controller.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/app/controllers/assets_controller.rb b/app/controllers/assets_controller.rb
index 801e0968..f8a7d1e4 100644
--- a/app/controllers/assets_controller.rb
+++ b/app/controllers/assets_controller.rb
@@ -6,12 +6,10 @@ class AssetsController < ApplicationController
6 before_action :login_required 6 before_action :login_required
7 7
8 layout 'admin' 8 layout 'admin'
9 9
10 def index 10 def index
11 @assets = Asset.order('id DESC').paginate( 11 scope = params[:q].present? ? Asset.editor_search(params[:q]) : Asset.all
12 :page => params[:page], 12 @assets = scope.order("id DESC").paginate(:page => params[:page], :per_page => 20)
13 :per_page => 20
14 )
15 end 13 end
16 14
17 # GET /assets/1 15 # GET /assets/1