def between(from, to)
      from_number, to_number = number_at(from), number_at(to)
      return [] if from_number.nil? || to_number.nil?

      condition = (from_number == to_number) ? to_number : Range.new(*[from_number, to_number].sort)
      where(:number => condition).order("#{table_name}.#{connection.quote_column_name('number')} #{(from_number > to_number) ? 'DESC' : 'ASC'}").to_a
    end
def between(from, to)
      from_number, to_number = number_at(from), number_at(to)
      return [] if from_number.nil? || to_number.nil?

      condition = (from_number == to_number) ? to_number : Range.new(*[from_number, to_number].sort)
      where(:number => condition).order("#{table_name}.#{connection.quote_column_name('number')} #{(from_number > to_number) ? 'DESC' : 'ASC'}").to_a
    end
Returns all versions between (and including) the two given arguments. See documentation for
 the +at+ extension method for what arguments are valid. If either of the given arguments is
 invalid, an empty array is returned.

 The +between+ method preserves returns an array of version records, preserving the order
 given by the arguments. If the +from+ value represents a version before that of the +to+
 value, the array will be ordered from earliest to latest. The reverse is also true.