Acts_as_taggable_on fails in rails 3.1
I am using acts_as_taggable_on on my rails 3.1 app. This is my model
class User < ActiveRecord::Base
acts_as_taggable_on :skills
end
I get this error the moment I try anything with the user o开发者_开发技巧bject.
NoMethodError: undefined method `acts_as_taggable_on' for #<Class:0x90bfd84>
I even tried just using acts_as_taggable
but didnt work. Am i doing anything wrong or is this a known issue?
I am using acts_as_taggable_on with rails 3.1 and it works ok. I am using acts_as_taggable 2.1.1
I defined acts_as_taggable in model I want to tag (ie Books) and acts_as_tagger in model that acts as tagger (ie User).
Gem documentation may be confusing because it tags users in the examples. ¿Do you want to tag users or another thing?
Did you make Post Installation steps?
rails generate acts_as_taggable_on:migration
rake db:migrate
In my case looking to table in database used by acts_as_taggable_on was helpful https://github.com/mbleigh/acts-as-taggable-on/blob/master/generators/acts_as_taggable_on_migration/templates/migration.rb
Hope this helps
精彩评论