skyeagle/nested_set — pull request #41 by AlexKVal (2011-11-09 14:43:00+00:00)
Title: bug: if not default id column used

I found a bug at base.rb:

# Returns the array of all children and self
def self_and_children
- nested_set_scope.where("#{q_parent} = ? or id = ?", id, id)
+ nested_set_scope.where("#{q_parent} = :id or #{q_primary_key} = :id", :id => self)
end

I propose to change id column name to be non default in fixtures for tests.
Thus it would prevent future errors of this kind.