has_many_polymorphs icon indicating copy to clipboard operation
has_many_polymorphs copied to clipboard

tagged_with_any: Is this tested? Supposed to work?

Open mugwump opened this issue 16 years ago • 3 comments

The tagging-extension definse two additional finders on the model, tagged_with and tagged_with_any - the code for tagged_with any (in tagging_extensions.rb) reads like this:

def self.tagged_with_any(*tag_list)

Shouldnt't this be def tagged_with_any(*tag_list)

With the self. I get an "undefined method" but even without the self, I get a Association named 'from' was not found; perhaps you misspelled it? (ActiveRecord::ConfigurationError)

Is this supposed to work, is it used/tested somewhere? Just asking, before I dive deeper into this and try to fix it...

thx&cheers Stefan

P.S: Is this the right place for communication anyway? It doesn't look like anybody is looking into these issues ever, should I go ask somewhere else?!

mugwump avatar Jun 25 '09 14:06 mugwump

ok, I didn't do any thorough tests, only superficially fixed it:

remove the self, and add a :joins to to the options like this:

add_joins!(sql, options[:joins], scope)

With this changes, the method works, although it needs a little more testing...

mugwump avatar Jun 25 '09 15:06 mugwump

failing test and patch please :-)

ghost avatar Aug 05 '09 21:08 ghost

the code above is the patch :) - I will look into that to write a proper patch and a test to that.

mugwump avatar Aug 06 '09 06:08 mugwump