Skip to content
Browse files

Fix regexp intervals.

  • Loading branch information...
1 parent 00318e9 commit 8a04bd0c832a5fe3f248225a732db54392e38fe4 @josevalim josevalim committed Dec 24, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 railties/lib/rails/generators/generated_attribute.rb
View
4 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 8a04bd0

Please sign in to comment.
Something went wrong with that request. Please try again.