ichizok/redmine_blogs — pull request #2 by hdgarrood (2013-05-13 17:26:00+00:00)
Title: convert to use redmine_acts_as_taggable_on

Currently, the ActsAsTaggable and AddTaggerAndContext migrations do not
play nice when other plugins are also using the 'acts-as-taggable-on'
gem. For example, when redmine_tags is already installed:

```
== ActsAsTaggable: migrating ==========================================
-- create_table(:tags)
rake aborted!
An error has occurred, this and all later migrations canceled:

SQLite3::SQLException: table "tags" already exists: CREATE TABLE ...
```

I've devised a solution to this problem, in the form of a small wrapper
around the acts-as-taggable-on gem designed specifically for Redmine
plugins. It's called 'redmine_acts_as_taggable_on', and the repository
is at https://github.com/hdgarrood/redmine_acts_as_taggable_on. I'd
encourage you to read the README (and also the source; it's not very
complex at all) to find out what it does exactly.

This commit converts redmine_blogs to use this gem, by adding a
declaration to init.rb, and replacing the old migrations with a single
new one.

The end result is that people will be able to use this plugin together
with other Redmine plugins which use acts-as-taggable-on without having
to troubleshoot messages like the one above, and will also not have to
worry about accidentally dropping the "tags" and "taggings" tables when
they're still in use by other plugins.