mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Fix regexp intervals.
This commit is contained in:
@@ -27,9 +27,9 @@ module Rails
|
||||
# when declaring options curly brackets should be used
|
||||
def parse_type_and_options(type)
|
||||
case type
|
||||
when /(string|text|binary|integer){(\d+)}/
|
||||
when /(string|text|binary|integer)\{(\d+)\}/
|
||||
return $1, :limit => $2.to_i
|
||||
when /decimal{(\d+),(\d+)}/
|
||||
when /decimal\{(\d+),(\d+)\}/
|
||||
return :decimal, :precision => $1.to_i, :scale => $2.to_i
|
||||
else
|
||||
return type, {}
|
||||
|
||||
Reference in New Issue
Block a user