Rails 4 protected attributes #389

MikeSilvis opened this Issue Aug 7, 2013 · 7 comments


None yet

6 participants


When upgrading to rails 4 and trying to modify tags via the tag_list method i get the following:

WARNING: Can't mass-assign protected attributes for ActsAsTaggableOn::Tagging: tag_id, context, taggable





I got rid of the protected attributes gem and it worked fine.


I monkeypatched ActsAsTaggableOn::Tag and ActsAsTaggableOn::Tagging so they are attr_accessibles


You want to include a gist of the work you did? Would probably also be useful to submit a PR with it.


$ cat config/initializers/acts_as_taggable_on_patch.rb

module ActsAsTaggableOn
  class Tag
    attr_accessible :name

  class Tagging
    attr_accessible :tag_id, :context, :taggable
@seuros seuros closed this Jan 30, 2014

Starting with acts-as-taggable-on 4.0.0, Tagging needs :tag on the list of attributes to make accessible as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment