I'm new to Ruby on Rails. How can I display products in two columns?
When I write the following, the right column will display the same products, but I want to display some in the left and some in the right columns.
#main_container
.left_col
%div{"data-hook" => "___homepage_featured_products"}
%h3
Featured Activities
- @featured.each do |pr|
- @product = pr
%a.box{:href=>url_for(@product), :title=>"#{@product.name} | #{@product.location}"}
- if @product.images[0]
.img{:style=>"background-image: url('#{@product.images[0].attachment.url(:original)}')"}
.details
%h3
= @product.name.truncate 20
%p.infos
= image_tag @product.activity_type.icon, :class=>"pictogram" rescue ''
%span= @product.activity_type.name.titleize rescue ''
\/
%span.price= number_to_currency @product.price rescue ''
\/
= @product.location
\/
= @product.level
%p
= @product.description.truncate(120) rescue ''
.right_col
Ctrl-K.