diff --git a/README.md b/README.md index 4d745e557..522205c88 100644 --- a/README.md +++ b/README.md @@ -87,7 +87,7 @@ You can circumvent at any time the problem of special characters [issue 623](htt ActsAsTaggableOn.force_binary_collation = true ``` -Or by running this rake task: +If `utf8_bin` collation is not aleady set on `name` column in your schema then make sure to set by re-running migration generator or run this rake task: ```shell rake acts_as_taggable_on_engine:tag_names:collate_bin diff --git a/lib/acts-as-taggable-on.rb b/lib/acts-as-taggable-on.rb index 3e6a6d9d3..25281b5c0 100644 --- a/lib/acts-as-taggable-on.rb +++ b/lib/acts-as-taggable-on.rb @@ -97,11 +97,13 @@ def delimiter=(string) def force_binary_collation=(force_bin) if Utils.using_mysql? if force_bin - Configuration.apply_binary_collation(true) + # This script should be executed only once not every time when rails is booted. + # Configuration.apply_binary_collation(true) @force_binary_collation = true @strict_case_match = true else - Configuration.apply_binary_collation(false) + # TODO: Add rake task to unset binary collation on db + # Configuration.apply_binary_collation(false) @force_binary_collation = false end end