Displaying 2 results from an estimated 2 matches for "owned_tags".
2011 Mar 15
1
Acts as taggable on ( tag ownership question )
...rs:
class User < ActiveRecord::Base
acts_as_tagger
end
class Photo < ActiveRecord::Base
acts_as_taggable_on :locations
end
@some_user.tag(@some_photo, :with => "paris, normandy", :on => :locations)
@some_user.owned_taggings
@some_user.owned_tags
@some_photo.locations_from(@some_user)
but I would like to be able to do something like
@some_photo.tagged_with("xxx, yyy", :from => @some_user)
but I can''t quite see how to do it from the current API.
Regards
Brad
--
You received this message because you are subsc...
2009 Feb 27
2
Getting unique entries from models?
I''m using acts_as_taggable_on and I want to get a list of unique
taggings. How can I do this? In a more general sense, say that I have
a Product model with attributes name and price. I have these:
id: 1
Name: Juice
Price: 5
id: 2
Name: Juice
Price: 5
So when I do a Product.find(:all) I''ll get both, but I only want one.
How can I do this so that no matter now many