Permalink
Browse files

Fix regexp intervals.

  • Loading branch information...
1 parent fc42998 commit 1db5f4e9adf391dbfaed3fe5930a8b0a7348b592 @josevalim josevalim committed Dec 24, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 railties/lib/rails/generators/generated_attribute.rb
@@ -27,9 +27,9 @@ def parse(column_definition)
# 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, {}

0 comments on commit 1db5f4e

Please sign in to comment.