Forum: Ruby on Rails Include a array from Better Nested Set in paginated statemen

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
2e2518ad224cf5aa9db204464335b709?d=identicon&s=25 Tony K. (Guest)
on 2007-01-17 19:43
(Received via mailing list)
I would like to include an array of breadcrumb information from using
Better Nested Set in the paginated information.
def list
  @location_listings = paginate :location_listings,
                                                  :per_page => 10,
                                                  :select => 'id,
location_id, category_id',
                                                  :conditions =>
["location_id = ?", params[:id]]

  #  The following uses the Better Nested Set class
  #  I would like to include the @ancestors in the paginated information
  #  to be displayed in the list.rhtml
  @categoryid = category_id #This is the same cateogry_id in the select
  category = Category.find(@categoryid)
  @ancestors = category.self_and_ancestors

  @locationid = params[:id]

Must I create a special query to do this or can I include the
@ancestors array in the paginated statement?
This topic is locked and can not be replied to.