Forum: Ruby on Rails acts_as_taggable patch 3866 needs some testing

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Sean Treadway (Guest)
on 2006-04-20 13:44
(Received via mailing list)
DHH's acts_as_taggable is now much more usable with this patch.

This patch adds scoped finders, documentation, and tests:

# Get tags for all articles in a blog

# Get tags for articles in a blog published in the last year
@blog.articles.tags :conditions => ['published_at > ?', 1.year.ago]

# Get related tags from article tags in a blog
@blog.articles.find_related_tags ['code', 'rails']

# Get blog articles tagged with any/all tags
@blog.articles.find_tagged_with :all => ['code', 'rails']
@blog.articles.find_tagged_with :any => ['code', 'rails']
@blog.articles.find_tagged_with ['code', 'rails'] # Depreciated

I would appreciate any feedback.

Brian F. (Guest)
on 2006-04-21 03:16
Hi Sean

I hope I'm not confused and that you are actually referring to this:

This patch looks really good and I'm going to be using/testing it. I was
pulling my hair out a bit with the original. Thanks to everyone who
worked on this.

Sean Treadway (Guest)
on 2006-04-21 13:17
(Received via mailing list)
Indeed...  Must have copied the URL from another tab.

Extra love for:

Luca M. (Guest)
on 2006-04-21 18:17
(Received via mailing list)
Sean Treadway wrote:
> @blog.articles.find_tagged_with :all => ['code', 'rails']
> @blog.articles.find_tagged_with :any => ['code', 'rails']
> @blog.articles.find_tagged_with ['code', 'rails'] # Depreciated  interface
> I would appreciate any feedback.
Very very nice!

I'm looking forward to test it in the near future.
(Thanks for having followed up on the initial patches ;-)

Hari R. (Guest)
on 2006-06-21 22:18
   I am RoR newbie.
Can someone explain How to install these patches?

Kevin O. (Guest)
on 2006-06-22 00:24
(Received via mailing list)
On Thursday, April 20, 2006, at 11:43 AM, Sean Treadway wrote:
>@blog.articles.tags :conditions => ['published_at > ?', 1.year.ago]
>Rails mailing list

IIRC, the first version had difficulty discriminating between tags in
STI classes.

If you did this...

B < A
C < A

and then did


it would return all A,B, and C with that tag.

Does this ticket fix that?
This topic is locked and can not be replied to.