Hi all, I have a problem that i want to print data in grid (table format)
following is my partial file named "_coupon.haml.html" -coupon_template.each do |template_data| -coupon.initializeFromTemplate(template_data) #div{:style=>"border: solid; border-color: gray; width: 310px;"} =haml_engine = Haml::Engine.new(CouponTemplate.find(coupon.template_id).data).render(Object.new, :coupon => coupon) %input{:type=>'radio', :name=>'coupon_template_id', :value=> template_data.id} %br %br %br %br %hr %table{:width => "100%"} %tr %td{:align => "right"} =link_to "Cancel", polymorphic_path(coupon.business) = submit_tag 'Next Step' Currently i am printing coupons one after one. I want it like following --------------------------------------------------------- coupon 1 | coupon 2 | coupon 3 | | | | -------------------|------------------|------------------| coupon 4 | coupon 5 | coupon 6 | | | | -------------------|------------------|------------------| I tried but there is no for loop such that for i=0, i<coupons.length, i+=3 Thanks, Vikas -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---