Sean Treadway
2006-Apr-20 09:43 UTC
[Rails] acts_as_taggable patch 3866 needs some testing
DHH''s acts_as_taggable is now much more usable with this patch. http://dev.rubyonrails.org/ticket/3866 This patch adds scoped finders, documentation, and tests: # Get tags for all articles in a blog @blog.articles.tags # 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 interface I would appreciate any feedback. -Sean
Brian Ford
2006-Apr-20 23:18 UTC
[Rails] Re: acts_as_taggable patch 3866 needs some testing
Hi Sean I hope I''m not confused and that you are actually referring to this: http://dev.rubyonrails.org/ticket/3928 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. Brian -- Posted via http://www.ruby-forum.com/.
Sean Treadway
2006-Apr-21 09:17 UTC
[Rails] Re: acts_as_taggable patch 3866 needs some testing
Indeed... Must have copied the URL from another tab. Extra love for: http://dev.rubyonrails.org/ticket/3928 Thanks, Sean On Apr 21, 2006, at 1:16 AM, Brian Ford wrote:> Hi Sean > > I hope I''m not confused and that you are actually referring to this: > > http://dev.rubyonrails.org/ticket/3928 > > 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. > > Brian > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails
Luca Mearelli
2006-Apr-21 14:16 UTC
[Rails] acts_as_taggable patch 3866 needs some testing
Sean Treadway wrote:> # Get tags for all articles in a blog > @blog.articles.tags > > # 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 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 ;-) bye, Luca
hari rajagopal
2006-Jun-21 18:18 UTC
[Rails] Re: acts_as_taggable patch 3866 needs some testing
Hi, I am RoR newbie. Can someone explain How to install these patches? -Thanks Hari -- Posted via http://www.ruby-forum.com/.
Kevin Olbrich
2006-Jun-21 20:22 UTC
[Rails] acts_as_taggable patch 3866 needs some testing
On Thursday, April 20, 2006, at 11:43 AM, Sean Treadway wrote:>DHH''s acts_as_taggable is now much more usable with this patch. > >http://dev.rubyonrails.org/ticket/3866 > >This patch adds scoped finders, documentation, and tests: > ># Get tags for all articles in a blog >@blog.articles.tags > ># 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 interface > >I would appreciate any feedback. > >-Sean >_______________________________________________ >Rails mailing list >Rails@lists.rubyonrails.org >http://lists.rubyonrails.org/mailman/listinfo/railsIIRC, the first version had difficulty discriminating between tags in STI classes. If you did this... B < A and C < A and then did C.find_tagged_with("tag") it would return all A,B, and C with that tag. Does this ticket fix that? _Kevin -- Posted with http://DevLists.com. Sign up and save your mailbox.