osunyorg/admin

View on GitHub
app/controllers/extranet/contacts/search_controller.rb

Summary

Maintainability
A
0 mins
Test Coverage
class Extranet::Contacts::SearchController < Extranet::Contacts::ApplicationController
  def index
    @term           = params[:term]
    @people         = current_extranet.connected_people
                                      .for_search_term(@term, current_language)
                                      .ordered(current_language)
                                      .limit(20)
    @organizations  = current_extranet.connected_organizations
                                      .for_search_term(@term, current_language)
                                      .ordered(current_language)
                                      .limit(20)
    breadcrumb
    add_breadcrumb 'Recherche'
  end
end