diff --git a/lib/redmine/nested_set/traversing.rb b/lib/redmine/nested_set/traversing.rb index 5b3c1cb..67b13d7 100644 --- a/lib/redmine/nested_set/traversing.rb +++ b/lib/redmine/nested_set/traversing.rb @@ -61,7 +61,7 @@ module Redmine # Returns the siblings def siblings - nested_set_scope.where(:parent_id => parent_id).where("id <> ?", id) + nested_set_scope.where(:parent_id => parent_id).where("#{self.class.table_name}.id <> ?", id) end # Returns the ancestors