# File lib/symetrie_com/acts_as_better_nested_set.rb, line 473 def root(scope = {}) # the BETWEEN clause is needed to ensure we get the right virtual root, if using those self.class.find_in_nested_set(:first, { :conditions => "#{scope_condition} \ AND (#{prefixed_parent_col_name} IS NULL OR #{prefixed_parent_col_name} = 0) AND (#{self[left_col_name]} BETWEEN #{prefixed_left_col_name} AND #{prefixed_right_col_name})" }, scope) end