Ticket #18 (closed enhancement: fixed)

Opened 2 years ago

Last modified 2 years ago

Add option to :include another model (e.g. parent)

Reported by: rails Assigned to: jcm
Priority: minor Milestone: 0.1 with tests
Component: plugin Version: 0.1
Keywords: parent :include include model Cc:

Description

To minimize the number of queries you may support adding the option to include our own :include clauses (For example I access my parents for every node which causes a new query)

Change History

10/26/06 16:28:48 changed by rails

  • version set to 0.1.
  • component changed from doc to plugin.

12/12/06 03:53:03 changed by Krishna

  • priority changed from major to minor.

I'm reluctant to make this change, since there are many query methods (13, I think), and passing an options hash to each of them would clutter the code a fair amount. Does anyone else out there need this badly? Would people only want it for full_set and all_children?

For your specific case above, keep in mind that nested_set does not set up an ActiveRecord? association to the parent, so passing :include => :parent wouldn't work unless you independently tell your class that it 'belongs_to :parent'.

02/07/07 17:51:55 changed by krishna

  • status changed from new to closed.
  • resolution set to fixed.

Closed by Fabien's excellent contributions.