michael-+08J6pdAJjhWk0Htik3J/w@public.gmane.org
2007-Dec-04 15:11 UTC
[ANN] ActsAsTaggableOn Released
ActsAsTaggableOn, or ''acts as taggable on steroids on steroids'', is now available to the public! == Overview = This plugin is heavily based on ActsAsTaggableOnSteroids by Jonathan Viney. While basic tagging functionality is handled expertly as well as tag cloud calculations, for many applications there may be a need to have several "tag fields" for a given model. For instance, in a social network, a user might have tags that are called skills, interests, sports, and more. There is no real way to differentiate between tags and so an implementation of this type is not possible with acts as taggable on steroids. Enter ActsAsTaggableOn. Rather than tying functionality to a specific keyword (namely "tags"), ActsAsTaggableOn allows you to specify an arbitrary number of tag "contexts" that can be used locally or in combination in the same way AATOS was used. == Installation = The simplest way is just to install straight from the SVN: script/plugin install http://svn.intridea.com/svn/public/acts_as_taggable_on == Example = class User < ActiveRecord::Base acts_as_taggable_on :tags, :skills, :interests end @user = User.new(:name => "Bobby") @user.tag_list = "awesome, slick, hefty" # this should be familiar @user.skill_list = "joking, clowning, boxing" # but you can do it for any context! @user.skill_list # => ["joking","clowning","boxing"] as TagList @user.save @user.tags # => [<Tag name:"awesome">,<Tag name:"slick">,<Tag name:"hefty">] @user.skills # => [<Tag name:"joking">,<Tag name:"clowning">,<Tag name:"boxing">] User.find_tagged_with("awesome", :on => :tags) # => [@user] User.find_tagged_with("awesome", :on => :skills) # => [] @frankie = User.create(:name => "Frankie", :skill_list => "joking, flying, eating") User.skill_counts # => [<Tag name="joking" count=2>,<Tag name="clowning" count=1>...] @bobby.skill_counts @frankie.skill_counts == Testing = Acts As Taggable On uses RSpec for its test coverage. If you already have RSpec on your application, the specs will run while using: rake spec:plugins Caveats, Uncharted Waters ======================== This plugin is still under active development. Tag caching has not been thoroughly (or even casually) tested and may not work as expected. Resources ======== SVN - http://svn.intridea.com/svn/public/acts_as_taggable_on Trac - http://trac.intridea.com/trac/public Copyright (c) 2007 Michael Bleigh and Intridea Inc., released under the MIT license --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I have updated the plugin to allow for dynamic tag contexts. Usage example: @user = User.new(:name => "Bobby") @user.set_tag_list_on(:customs, "same, as, tag, list") @user.tag_list_on(:customs) # => ["same","as","tag","list"] @user.save @user.tags_on(:customs) # => [<Tag name=''same''>,...] @user.tag_counts_on(:customs) User.find_tagged_with("same", :on => :customs) # => [@user] I have also fixed the missing generator, so everything should be good to go! Michael On Dec 4, 2007, at 10:11 AM, michael-+08J6pdAJjhWk0Htik3J/w@public.gmane.org wrote:> > ActsAsTaggableOn, or ''acts as taggable on steroids on steroids'', is > now available to the public! > > == Overview => > This plugin is heavily based on ActsAsTaggableOnSteroids by Jonathan > Viney. While > basic tagging functionality is handled expertly as well as tag cloud > calculations, for > many applications there may be a need to have several "tag fields" for > a given model. > > For instance, in a social network, a user might have tags that are > called skills, > interests, sports, and more. There is no real way to differentiate > between tags and > so an implementation of this type is not possible with acts as > taggable on steroids. > > Enter ActsAsTaggableOn. Rather than tying functionality to a specific > keyword > (namely "tags"), ActsAsTaggableOn allows you to specify an arbitrary > number of > tag "contexts" that can be used locally or in combination in the same > way AATOS > was used. > > == Installation => > The simplest way is just to install straight from the SVN: > > script/plugin install http://svn.intridea.com/svn/public/acts_as_taggable_on > > == Example => > class User < ActiveRecord::Base > acts_as_taggable_on :tags, :skills, :interests > end > > @user = User.new(:name => "Bobby") > @user.tag_list = "awesome, slick, hefty" # this should be > familiar > @user.skill_list = "joking, clowning, boxing" # but you can do it for > any context! > @user.skill_list # => ["joking","clowning","boxing"] as TagList > @user.save > > @user.tags # => [<Tag name:"awesome">,<Tag name:"slick">,<Tag > name:"hefty">] > @user.skills # => [<Tag name:"joking">,<Tag name:"clowning">,<Tag > name:"boxing">] > > User.find_tagged_with("awesome", :on => :tags) # => [@user] > User.find_tagged_with("awesome", :on => :skills) # => [] > > @frankie = User.create(:name => "Frankie", :skill_list => "joking, > flying, eating") > User.skill_counts # => [<Tag name="joking" count=2>,<Tag > name="clowning" count=1>...] > > @bobby.skill_counts > @frankie.skill_counts > > == Testing => > Acts As Taggable On uses RSpec for its test coverage. If you already > have RSpec on your > application, the specs will run while using: > > rake spec:plugins > > Caveats, Uncharted Waters > ========================> > This plugin is still under active development. Tag caching has not > been thoroughly (or even casually) tested and may not work as > expected. > > Resources > ========> > SVN - http://svn.intridea.com/svn/public/acts_as_taggable_on > Trac - http://trac.intridea.com/trac/public > > Copyright (c) 2007 Michael Bleigh and Intridea Inc., released under > the MIT license > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Great I was just looking for something like this as I''m doing context''s within my photo app. Tagging People & Places wasn''t sure how I was going to do it, but now this has arrived :) God work :) On 12/13/07, Michael Bleigh <mbleigh-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > I have updated the plugin to allow for dynamic tag contexts. Usage > example: > > @user = User.new(:name => "Bobby") > @user.set_tag_list_on(:customs, "same, as, tag, list") > @user.tag_list_on(:customs) # => ["same","as","tag","list"] > @user.save > @user.tags_on(:customs) # => [<Tag name=''same''>,...] > @user.tag_counts_on(:customs) > User.find_tagged_with("same", :on => :customs) # => [@user] > > I have also fixed the missing generator, so everything should be good > to go! > > Michael > > On Dec 4, 2007, at 10:11 AM, michael-+08J6pdAJjhWk0Htik3J/w@public.gmane.org wrote: > > > > > ActsAsTaggableOn, or ''acts as taggable on steroids on steroids'', is > > now available to the public! > > > > == Overview => > > > This plugin is heavily based on ActsAsTaggableOnSteroids by Jonathan > > Viney. While > > basic tagging functionality is handled expertly as well as tag cloud > > calculations, for > > many applications there may be a need to have several "tag fields" for > > a given model. > > > > For instance, in a social network, a user might have tags that are > > called skills, > > interests, sports, and more. There is no real way to differentiate > > between tags and > > so an implementation of this type is not possible with acts as > > taggable on steroids. > > > > Enter ActsAsTaggableOn. Rather than tying functionality to a specific > > keyword > > (namely "tags"), ActsAsTaggableOn allows you to specify an arbitrary > > number of > > tag "contexts" that can be used locally or in combination in the same > > way AATOS > > was used. > > > > == Installation => > > > The simplest way is just to install straight from the SVN: > > > > script/plugin install > http://svn.intridea.com/svn/public/acts_as_taggable_on > > > > == Example => > > > class User < ActiveRecord::Base > > acts_as_taggable_on :tags, :skills, :interests > > end > > > > @user = User.new(:name => "Bobby") > > @user.tag_list = "awesome, slick, hefty" # this should be > > familiar > > @user.skill_list = "joking, clowning, boxing" # but you can do it for > > any context! > > @user.skill_list # => ["joking","clowning","boxing"] as TagList > > @user.save > > > > @user.tags # => [<Tag name:"awesome">,<Tag name:"slick">,<Tag > > name:"hefty">] > > @user.skills # => [<Tag name:"joking">,<Tag name:"clowning">,<Tag > > name:"boxing">] > > > > User.find_tagged_with("awesome", :on => :tags) # => [@user] > > User.find_tagged_with("awesome", :on => :skills) # => [] > > > > @frankie = User.create(:name => "Frankie", :skill_list => "joking, > > flying, eating") > > User.skill_counts # => [<Tag name="joking" count=2>,<Tag > > name="clowning" count=1>...] > > > > @bobby.skill_counts > > @frankie.skill_counts > > > > == Testing => > > > Acts As Taggable On uses RSpec for its test coverage. If you already > > have RSpec on your > > application, the specs will run while using: > > > > rake spec:plugins > > > > Caveats, Uncharted Waters > > ========================> > > > This plugin is still under active development. Tag caching has not > > been thoroughly (or even casually) tested and may not work as > > expected. > > > > Resources > > ========> > > > SVN - http://svn.intridea.com/svn/public/acts_as_taggable_on > > Trac - http://trac.intridea.com/trac/public > > > > Copyright (c) 2007 Michael Bleigh and Intridea Inc., released under > > the MIT license > > > > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---