Commit 37adad4c by Jeremy Mickelson Committed by Cuong Tran

Use regex matching that works for ruby pre 2.4 (#572)

parent 365b0126
......@@ -362,7 +362,7 @@ module AnnotateModels
end
def get_col_type(col)
if (col.respond_to?(:bigint?) && col.bigint?) || /\Abigint\b/.match?(col.sql_type)
if (col.respond_to?(:bigint?) && col.bigint?) || /\Abigint\b/ =~ col.sql_type
'bigint'
else
(col.type || col.sql_type).to_s
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment