Questions tagged «will-paginate»

7
Ruby on Rails将对数组进行分页
我想知道是否有人可以解释如何使用 在对象数组上will_paginate? 例如,在我的网站上,我有一个意见栏,用户可以在其中对意见进行评分。这是我写的一种方法,用于收集对该意见进行评级的用户: def agree_list list = OpinionRating.find_all_by_opinion_id(params[:id]) @agree_list = [] list.each do |r| user = Profile.find(r.profile_id) @agree_list << user end end 谢谢
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.