From f66b53a691eb8802613f4365468471a477723a84 Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Fri, 28 Aug 2015 18:10:30 +0800 Subject: [PATCH] added site domain for search --- app/controllers/admin/registered_sites_controller.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/admin/registered_sites_controller.rb b/app/controllers/admin/registered_sites_controller.rb index 590257f..3e0a2f1 100644 --- a/app/controllers/admin/registered_sites_controller.rb +++ b/app/controllers/admin/registered_sites_controller.rb @@ -9,7 +9,7 @@ class Admin::RegisteredSitesController < OrbitAdminController @tags = @module_app.tags @categories = @module_app.categories.enabled @filter_fields = filter_fields_without_status(@categories, @tags) - @registeredsites = search_data(@registeredsites,[:title]).page(params[:page]).per(10) + @registeredsites = search_data(@registeredsites,[:title,:site_domain]).page(params[:page]).per(10) if request.xhr? render :partial => "index" @@ -51,7 +51,7 @@ class Admin::RegisteredSitesController < OrbitAdminController @registeredsites = RegisteredSite.all.order_by(sort) .with_categories(filters("category")) .with_tags(filters("tag")).desc(:created_at) - @registeredsites = search_data(@registeredsites,[:title]).page(params[:page]).per(10) + @registeredsites = search_data(@registeredsites,[:title,:site_domain]).page(params[:page]).per(10) # render :partial => "index" end @@ -61,11 +61,11 @@ class Admin::RegisteredSitesController < OrbitAdminController registeredsite.destroy end @table_fields = table_fields - + @registeredsites = RegisteredSite.all.order_by(sort) .with_categories(filters("category")) .with_tags(filters("tag")).desc(:created_at) - @registeredsites = search_data(@registeredsites,[:title]).page(params[:page]).per(10) + @registeredsites = search_data(@registeredsites,[:title,:site_domain]).page(params[:page]).per(10) end private