diff options
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/generators/generated_attribute.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/railties/lib/rails/generators/generated_attribute.rb b/railties/lib/rails/generators/generated_attribute.rb index 132145474b..964bd6280c 100644 --- a/railties/lib/rails/generators/generated_attribute.rb +++ b/railties/lib/rails/generators/generated_attribute.rb @@ -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, {} |