Tony K.
2007-Jan-17 18:32 UTC
Include a array from Better Nested Set in paginated statement?
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? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---