{#<Farm id: 1, name: "Farm A", harvest: 2, offers: "Buy now, Delivery", about: "We rocks!",
created_at: "2011-04-23 12:33:43", updated_at: "2011-04-25 09:02:15",logo: "images__9_.jpg", latitude: 42.3214, longitude: -71.0722, address: "555 Dudley Street, Boston, MA", votes_count: 2>=>4482.753159399051, #<Farm id: 2, name: "Farm B",harvest: 3,
offers: "Buy Now, Delivery", about: "We rock the farm A!", created_at: "2011-04-23 12:36:29", updated_at: "2011-04-25 09:02:15", logo: "images__7_.jpg", latitude: 42.3442, longitude: -71.0995, address: "1345 Boylston Street,Boston, MA", votes_count: 2 > => 4482.571841402453}
我剪切了样本(也可以在那里查看http://pastie.org/1871728)。我需要这个哈希的分页。使用 kaminari 或 will_paginate 没有区别。如果这件事我在视图中输出这个哈希就像
- @sort_farms.count.times do
- farm = @sort_farms.shift
%p
= image_tag farm[0].logo.url.to_s
= farm[0].harvest
等等...你能帮帮我吗,拜托。