Skip to content

Instantly share code, notes, and snippets.

@sprite2005
Created September 4, 2009 07:14
Show Gist options
  • Save sprite2005/180779 to your computer and use it in GitHub Desktop.
Save sprite2005/180779 to your computer and use it in GitHub Desktop.
def search
@products = Products.search params[:q]
@products.each_with_index do |e, i|
existing_product = Products.find_by_asin(e.asin)
@products[i] = existing_product if existing_product
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment