Skip to content

Instantly share code, notes, and snippets.

@jonmarkgo
Created April 22, 2011 18:54
Show Gist options
  • Save jonmarkgo/937367 to your computer and use it in GitHub Desktop.
Save jonmarkgo/937367 to your computer and use it in GitHub Desktop.
Sphinx search
@listings = Listing.search params[:description],
:star => true,
:geo => [params[:lat].to_i,params[:lng].to_i],
:with => {
:page => params[:page].to_i,
:per_page => params[:per_page].to_i,
:price => params[:min_price].to_i..params[:max_price].to_i
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment