-
Notifications
You must be signed in to change notification settings - Fork 8
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
undefined method `[]' for nil:NilClass #9
Comments
How are preferences defined in user model? |
|
Gaurav2728
pushed a commit
to Gaurav2728/serial_preference
that referenced
this issue
Sep 11, 2017
asanghi#9 After adding preferences column using migration and also populate data using migration preferences column not updated with HashWithIndifferentAccess.new We need to reset the self.class.reset_column_information and set preferences as a Hash Now preferences column able to write/store all preferences attributes
Gaurav2728
added a commit
to Gaurav2728/serial_preference
that referenced
this issue
Sep 11, 2017
asanghi#9 After adding preferences column using migration and also populate data using migration preferences column not updated with HashWithIndifferentAccess.new We need to reset the self.class.reset_column_information and set preferences as a Hash Now preferences column able to write/store all preferences attributes
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Steps to reproduce the bug:-
Ruby 2.4.1
Rails 4.2.1
Add
preferences
column to users table.Add rake task in migration to populate data for preferences column
user_preferences.rake
Error logs
When we re-run the migration it'll successfully run. This is a race condition when
preferences
will not set and it'll fall back but re-run the migration found thepreferences
and run successfully in2nd
time.The text was updated successfully, but these errors were encountered: