Created
May 7, 2015 03:38
-
-
Save thatrubylove/69b28ba5cb0f5813f8d7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!ruby | |
# config/initializers/mysql_utf8mb4_fix.rb | |
require 'active_record/connection_adapters/abstract_mysql_adapter' | |
module ActiveRecord | |
module EmojiConnectionAdapters | |
refine AbstractMysqlAdapter do | |
NATIVE_DATABASE_TYPES[:string] = { name: "varchar", limit: 191 } | |
end | |
end | |
module ConnectionAdapters | |
using EmojiConnectionAdapters | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment