populated database using faker gem
made search form and used a partial to render products
changed index in controller to handle search param and match a product name
made search with xhr object
write javascript in javascript assets for rails
search with $.ajax
search with $.get
made search with $.getScript