def scope
      if tree.columns.scope?
        tree.base_class.where Hash[tree.columns.scope.map { |column| [column, record[column]] }]
      else
        tree.base_class.where(nil)
      end
    end
def scope
      if tree.columns.scope?
        tree.base_class.where Hash[tree.columns.scope.map { |column| [column, record[column]] }]
      else
        tree.base_class.where(nil)
      end
    end
Returns scope to which record should be applied