diff options
author | José Valim <jose.valim@gmail.com> | 2011-12-24 12:53:27 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-12-24 12:53:56 +0100 |
commit | 8a04bd0c832a5fe3f248225a732db54392e38fe4 (patch) | |
tree | 62c4e04cdc44b03921108a9ed00bb41a91123a0b /railties | |
parent | 00318e9bdfc346a57cab34b2ec3724f3e9605ac1 (diff) | |
download | rails-8a04bd0c832a5fe3f248225a732db54392e38fe4.tar.gz rails-8a04bd0c832a5fe3f248225a732db54392e38fe4.tar.bz2 rails-8a04bd0c832a5fe3f248225a732db54392e38fe4.zip |
Fix regexp intervals.
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, {} |