I would like to include an array of breadcrumb information from using
Better Nested Set in the paginated information.
def list
@location_listing_pages,
@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
above
category = Category.find(@categoryid)
@ancestors = category.self_and_ancestors
@locationid = params[:id]
end
Must I create a special query to do this or can I include the
@ancestors array in the paginated statement?