Rails 使用 will_paginate 分页问题

a8885313 · 2013年01月16日 · 1746 次阅读

class BlogYear < ActiveRecord::Base default_scope :order => "name Desc" attr_accessible :name ,:blogs has_many :blogs end

使用 will_paginate 给 BlogYear 中 blogs 分页,

class Blog < ActiveRecord::Base belongs_to :blog_year attr_accessible :content , :title... end

并不能直接给 Blog 分页因为要根据 BlogYear 分组

暂无回复。
需要 登录 后方可回复, 如果你还没有账号请 注册新账号