Edit
The Github instructions tell you to use the gemcutter source for the gem. This currently installs version 2.0.5, which includes an error, which I described in detail below.
@Vlad Zloteanu demonstrates that 1.0.5 does not include an error. I also tried with 1.0.5 and confirmed that there is no error in this version . People struggle with act_as_taggable_on and own tags on 2.x, roll back and wait for correction.
For some reason, tags are not displayed on the taggable if a tagger is specified.
message testing
class Post < ActiveRecord::Base
acts_as_taggable_on :tags
belongs_to :user
end
>> p = Post.first
=> #<Post id: 1, ...>
>> p.is_taggable?
=> true
>> p.tag_list = "foo, bar"
=> "foo, bar"
>> p.save
=> true
>> p.tags
=> [#<Tag id: 1, name: "foo">, #<Tag id: 2, name: "bar">]
user testing
class User < ActiveRecord::Base
acts_as_tagger
has_many :posts
end
>> u = User.first
=> #<User id: 1, ...>
>> u.is_tagger?
=> true
>> u.tag(p, :with => "hello, world", :on => :tags)
=> true
>> u.owned_tags
=> [#<Tag id: 3, name: "hello">, #<Tag id: 4, name: "world">]
update message
>> p = Post.first
=> #<Post id: 1 ...>
>> p.tags
=> [#<Tag id: 2, name: "bar">, #<Tag id: 1, name: "foo">]
hello world? , , tagger_id tagger_type NULL, . , - User? ?
:
Post.tagged_with("hello")
#=> #<Post id: 1, ...>
! , ! Post#tags Post#tag_list?