Dema has created a nice acts_as_taggable
mixin that allows you to add metadata tagging to your ActiveRecord object model.
Nice and clean.
class Photo < ActiveRecord::Base
acts_as_taggable
endphoto = Photo.new
# standard tagging with a string
photo.tag 'brazil rio beach'# tagging with an array
photo.tag ['south america', 'soccer']# tagging with a different separator
photo.tag 'beautiful women, babes, hot chicks', :separator => ','# tagging with a Proc separator
photo.tag '2001..2005', :separator => proc { |s| eval(s).to_a }# suppose your tags_photos join table has attributes
# and you want to set them while you tag
photo.tag 'samba', :attributes => { :tagged_at => Time.now }# Let