Skip to content

Commit

Permalink
Merge pull request #268 from CodingFu/master
Browse files Browse the repository at this point in the history
Update typo in documentation
  • Loading branch information
manusajith committed Mar 30, 2014
2 parents cb7d972 + 8b96c24 commit f3c5b54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -302,7 +302,7 @@ form elements to get the values:
term = params[:term]
brand_id = params[:brand_id]
country = params[:country]
products = Product.where('brand = ? AND country = ? AND name LIKE ?', brand_id, country, "%term%").order(:name).all
products = Product.where('brand = ? AND country = ? AND name LIKE ?', brand_id, country, "%#{term}%").order(:name).all
render :json => products.map { |product| {:id => product.id, :label => product.name, :value => product.name} }
end
end
Expand Down

0 comments on commit f3c5b54

Please sign in to comment.