Im using acts-as-taggable-on (3.0.1) and I tried some code on console:
irb(main):005:0* Noticia.last.tags
=> [#<ActsAsTaggableOn::Tag id: 9159, name: "oil">]
irb(main):006:0> Noticia.tagged_with("oil")
=> []
I noticed that my second query dont add a JOIN at sql:
Noticia Load (0.5ms) SELECT "noticia".* FROM "noticia" WHERE (deleted_at IS NULL) ORDER BY noticia.id_noticia DESC LIMIT 1
ActsAsTaggableOn::Tag Load (0.5ms) SELECT "tags".* FROM "tags" INNER JOIN "taggings" ON "tags".id = "taggings".tag_id WHERE (("taggings".taggable_id = 10630) AND ("taggings".taggable_type = 'Noticia') AND ((taggings.context = ('tags'))))
ActsAsTaggableOn::Tag Load (3.9ms) SELECT "tags".* FROM "tags" WHERE (lower(name) = 'oil')
Noticia Load (0.3ms) SELECT "noticia".* FROM "noticia" WHERE (deleted_at IS NULL) AND (1 = 0)
I don't know what's the problem, In acts-as-taggable-on doc say I just run 'Model.tagged_with("my_tag")'. I followed these step to configure acts-as-taggable-on