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

RuntimeError: can't modify frozen ActiveSupport::HashWithIndifferentAccess #518

Closed
sapna-prajapati opened this issue Jun 16, 2016 · 3 comments

Comments

@sapna-prajapati
Copy link

sapna-prajapati commented Jun 16, 2016

Gem is not working at all with Rails 4.2.3 and gem 'globalize', github: 'ncri/globalize'.
While initialize the object as below:

post = Post.new(title: "Title")

it shows "RuntimeError: can't modify frozen ActiveSupport::HashWithIndifferentAccess" error always.

class Post < ActiveRecord::Base
translates title, :fallbacks_for_empty_translations => true
end

@ridiculous
Copy link
Contributor

backtrace?

@sapna-prajapati
Copy link
Author

sapna-prajapati commented Jun 17, 2016

Please find the configuration/codesnippet as below:
Rails
rails version: 4.2.3

Migration:
def up
Post.create_translation_table!
end

def down
Post.drop_translation_table!
end

Model
class Post < ActiveRecord::Base
translates title, :fallbacks_for_empty_translations => true
end

Console
Post.create(title: "My First Post") OR Post.new(title: "Title")

Error
it shows "RuntimeError: can't modify frozen ActiveSupport::HashWithIndifferentAccess" error always.

@shioyama
Copy link
Contributor

shioyama commented Oct 1, 2016

If you have questions about ncri/globalize, then please ask them on the fork, not here. If they are problems with globalize/globalize, then I will re-open this.

@shioyama shioyama closed this as completed Oct 1, 2016
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

3 participants