Skip to content

Instantly share code, notes, and snippets.

@overture8
Created October 24, 2009 16:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save overture8/217607 to your computer and use it in GitHub Desktop.
Save overture8/217607 to your computer and use it in GitHub Desktop.
def search_results
search = Company.search do
keywords 'belfast marketing'
with(:sector_type_id).any_of [1, 2, 4, 8]
paginate :page => page_number, :per_page => 30
order_by :name, :asc
end
@results = search.results
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment