Skip to content

Instantly share code, notes, and snippets.

@sprite2005
Created September 4, 2009 07:27
Show Gist options
  • Save sprite2005/180782 to your computer and use it in GitHub Desktop.
Save sprite2005/180782 to your computer and use it in GitHub Desktop.
def search
@products = Products.search params[:q]
existing_products = Products.find(:all, :conditions => [:asin => @products.collect(&:asin)])
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment