Acts_as_taggable, v1.0.4 and v.2.0.2

Hi all,

After update to 2.0.2 version of acts_as_taggable plugin, I am having a
lot of exceptions during unit tests run, these exceptions look like the

table not found: “credits_tags”

And that is right, since that table has different name in database, it’s
actually called “tags_credits”. I’ve fixed this by adding :join_table
declaration to model, but since I am not sure that is best solution I
decided to diff plugin code among its versions:

default_join_table = “#{tag_model.table_name}_#{self.table_name}”

if tag_model.table_name < self.table_name
default_join_table = “#{tag_model.table_name}#{self.table_name}"
default_join_table = "#{self.table_name}

Confused a lot… I have no idea why someone needs that condition there,
is it helpful at all? Can you please advice?

Thanks for your help!

in has_and_belong_to_many Relationships, rails assumes that the
jointable is named table1_table2, e.g. credits_tags, BUT it is a
convention that the alphabetically “lower” (my damn english) name
comes first.

So following rails conventions, it should be credits_tags, but
tags_waffels. That’s what this condition checks.

So it seems the new version of this plugin just tries to follow rails
convention, which is a good thing.