Module: SearchHelper

Defined in:
app/helpers/search_helper.rb

Instance Method Summary collapse

Instance Method Details

#get_search_query_wordsObject



2
3
4
5
6
# File 'app/helpers/search_helper.rb', line 2

def get_search_query_words
  search_query = ""
  bare_query = strip_tags(params[:q]) unless bare_query.html_safe?
  return bare_query.strip.split
end

#search_results?(key) ⇒ Boolean

Returns:

  • (Boolean)


8
9
10
11
12
# File 'app/helpers/search_helper.rb', line 8

def search_results?(key)
  SocialStream::Search.count(params[:q],
                             current_subject,
                             :key => key) > 0
end