aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2012-01-04 16:11:43 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2012-01-04 16:11:43 -0800
commit8e051a180e3d740cdb8e2390ef2f1c0d7b08c956 (patch)
treecc8e6c16a9a16d7e761fb7f734bbfb820dcd79fe /activerecord
parent071c8bf62ac7ffdb587268a6789fd825d0dae2a6 (diff)
downloadrails-8e051a180e3d740cdb8e2390ef2f1c0d7b08c956.tar.gz
rails-8e051a180e3d740cdb8e2390ef2f1c0d7b08c956.tar.bz2
rails-8e051a180e3d740cdb8e2390ef2f1c0d7b08c956.zip
use regular expression or statement. loltargetrichenvironment
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/schema_dumper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/schema_dumper.rb b/activerecord/lib/active_record/schema_dumper.rb
index cdde5cf3b9..3cdbaf8b7b 100644
--- a/activerecord/lib/active_record/schema_dumper.rb
+++ b/activerecord/lib/active_record/schema_dumper.rb
@@ -112,7 +112,7 @@ HEADER
# AR has an optimization which handles zero-scale decimals as integers. This
# code ensures that the dumper still dumps the column as a decimal.
- spec[:type] = if column.type == :integer && [/^numeric/, /^decimal/].any? { |e| e.match(column.sql_type) }
+ spec[:type] = if column.type == :integer && /^(numeric|decimal)/ =~ column.sql_type
'decimal'
else
column.type.to_s