Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

use regular expression or statement. loltargetrichenvironment

  • Loading branch information...
commit 8e051a180e3d740cdb8e2390ef2f1c0d7b08c956 1 parent 071c8bf
@tenderlove tenderlove authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  activerecord/lib/active_record/schema_dumper.rb
View
2  activerecord/lib/active_record/schema_dumper.rb
@@ -112,7 +112,7 @@ def table(table, stream)
# 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
Please sign in to comment.
Something went wrong with that request. Please try again.