ruby on rails - How to create filterable and sortable div elements -
i using rails 3 , ruby 1.9 develop ecommerce app. have loop pulling product info database div each product populate storefront.
problem have been been trying without luck figure out how make products sortable , filterable. want potential customers able filter and/or sort products listing of data associated products (e.g., sort date added or filter manufacturer).
so far i've come across templates using jquery accomplish this, haven't been able find leveraging rails framework. ive included code below. assistance appreciated.
<div class="store-header1"><h2>today's</h2> </div><div class="store-header2"><h2>offers</h2></div> <% @products.each |product| %> <div class="primary"> <div class="dots"> <div id="offer-title"> <%= product.title %> </div> <%= image_tag(product.image_url, :alt =>product.title, :class=>"product-image")%>
Comments
Post a Comment