Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rails 4.2 Can't modify frozen hash ActiveSupport::HashWithIndifferentAccess #580

Closed
the-teacher opened this issue Aug 27, 2014 · 4 comments

Comments

@the-teacher
Copy link

I have Can't modify frozen hash ActiveSupport::HashWithIndifferentAccess when I do blog.tag_list = "hello" with rails 4.2

Now I dont know how to fix it.

@the-teacher
Copy link
Author

https://github.com/mbleigh/acts-as-taggable-on/blob/master/lib/acts_as_taggable_on/taggable/core.rb#L351

changed_attributes

I haven't tag_list into this hash

and changed_attributes[attrib] gives problem

@seuros
Copy link
Collaborator

seuros commented Aug 29, 2014

Tag list should receive an array or a TagList

@twalpole
Copy link
Contributor

I believe PR #583 fixes this -- changed_attributes is frozen in rails 4.2 so can't be modified through the accessor. Rails 4.2 also requires filtering the *_list attributes from changed_attributes when doing db updates.

@jnankin
Copy link

jnankin commented May 16, 2016

Will a new version of the gem come out that contains this fix? Right now it looks like I'll have to tie this to a master commit in my Gemfile to get this fix.

thogg4 added a commit to railsgarage/spree-blogging-spree that referenced this issue Nov 1, 2018
thogg4 added a commit to railsgarage/spree-blogging-spree that referenced this issue Nov 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants