Commit ece35e6ad31e5098321d19273cf96485a1fa3ee7
1 parent
5dfdffeb
Fix get communities to use core method
Signed-off-by: Gabriela Navarro <navarro1703@gmail.com>
Showing
1 changed file
with
5 additions
and
4 deletions
Show diff stats
lib/ext/search_controller.rb
@@ -3,10 +3,11 @@ require_dependency 'search_controller' | @@ -3,10 +3,11 @@ require_dependency 'search_controller' | ||
3 | class SearchController | 3 | class SearchController |
4 | 4 | ||
5 | def communities | 5 | def communities |
6 | - results = filter_communities_list do |community| | ||
7 | - !community.software? and !community.institution? | ||
8 | - end | ||
9 | - results = results.paginate(:per_page => 24, :page => params[:page]) | 6 | + @scope = visible_profiles(Community) |
7 | + full_text_search | ||
8 | + results = @searches[@asset][:results] | ||
9 | + | ||
10 | + results = results.each {|community| !community.software? and !community.institution?} | ||
10 | @searches[@asset] = {:results => results} | 11 | @searches[@asset] = {:results => results} |
11 | @search = results | 12 | @search = results |
12 | end | 13 | end |