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:27 +0100 |
commit | 1db5f4e9adf391dbfaed3fe5930a8b0a7348b592 (patch) | |
tree | 0d38d52d83a38daeac1634a771a1647b819bada8 /railties/lib/rails/generators/generated_attribute.rb | |
parent | fc4299805e5dc6cee0c81a94b2fcb9bb2a714b01 (diff) | |
download | rails-1db5f4e9adf391dbfaed3fe5930a8b0a7348b592.tar.gz rails-1db5f4e9adf391dbfaed3fe5930a8b0a7348b592.tar.bz2 rails-1db5f4e9adf391dbfaed3fe5930a8b0a7348b592.zip |
Fix regexp intervals.
Diffstat (limited to 'railties/lib/rails/generators/generated_attribute.rb')
-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, {} |