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

With Rails 4.1 : Can't mass-assign protected attributes for ActiveRecord::SessionStore::Session: session_id, data #30

Closed
rtcoms opened this issue Jun 6, 2014 · 1 comment

Comments

@rtcoms
Copy link

rtcoms commented Jun 6, 2014

I am migrating my project from Rails.3.2.x to Rails 4.1

installed gem

gem 'activerecord-session_store', '~>0.0.1'
gem 'protected_attributes', '~>1.0.1'

but still getting mass assignment error. what can be the solution for this ? Should I create a custom session store class and set attribute_accessors accordingly ?

@rtcoms
Copy link
Author

rtcoms commented Jun 6, 2014

Resolved it by putting below code in config/application.rb

 ActiveRecord::SessionStore::Session.attr_accessible :data, :session_id

@rtcoms rtcoms closed this as completed Jun 6, 2014
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

1 participant