Gem 使用 acts-as-taggable-on 时碰到的问题

hastings · December 24, 2014 · Last by as181920 replied at December 24, 2014 · 2482 hits

When upgrading

Re-run the migrations generator

rake acts_as_taggable_on_engine:install:migrations

It will create any new migrations and skip existing ones

##Breaking changes:

  • ActsAsTaggableOn::Tag is not extend with ActsAsTaggableOn::Utils anymore. Please use ActsAsTaggableOn::Utils instead

上面最后两行话我的理解是请在项目中使用 ActsAsTaggableOn::Utils,不要再用 ActsAsTaggableOn::Tag 我的理解有没有错?

对比 gem 的历史版本发现 ActsAsTaggableOn::Tag 不再 include ActsAsTaggableOn::Utils

没错。 主要是修复存在多个数据库时的错误,因为 ActsAsTaggableOn::Utils 多数情况都是用在测试中,所以一般不会有太大影响。

issus: https://github.com/mbleigh/acts-as-taggable-on/issues/524 pr: https://github.com/mbleigh/acts-as-taggable-on/commit/43970dc2d7fb966cae332a3eaa7f53604cc06c26

数据量大的时候,如果用 exclude,性能可能会不高,具体看 sql 语句

You need to Sign in before reply, if you don't have an account, please Sign up first.