From 414cfbdae09b380e49938bfb1532147ed8865bfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonne=20Ha=C3=9F?= Date: Sun, 15 Mar 2015 15:59:06 +0100 Subject: [PATCH] Array#to_h is new in Ruby 2.1, we still suppport 2.0 --- db/migrate/20150106050733_set_mysql_to_unicode_mb4.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/migrate/20150106050733_set_mysql_to_unicode_mb4.rb b/db/migrate/20150106050733_set_mysql_to_unicode_mb4.rb index b69c3317f..6d16ce30d 100644 --- a/db/migrate/20150106050733_set_mysql_to_unicode_mb4.rb +++ b/db/migrate/20150106050733_set_mysql_to_unicode_mb4.rb @@ -37,12 +37,12 @@ class SetMysqlToUnicodeMb4 < ActiveRecord::Migration def character_columns # build a hash with all the columns that contain characters - @character_columns ||= tables.map {|table| + @character_columns ||= Hash[tables.map {|table| col = columns(table) .select {|column| column.type == :string || column.type == :text } next if col.empty? [table, col] - }.compact.to_h + }.compact] end def shorten_indexes