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

compatibility hack for jobs created pre rails 4.2 #835

Closed

Conversation

ignatiusreza
Copy link

Upgrading rails to 4.2 breaks delayed_jobs when its worker is trying to run jobs created in pre 4.2 with the following error:

NoMethodError: undefined method `fetch_value' for #<Hash:>
from /path_to_gems/activerecord-4.2.3/lib/active_record/attribute_methods/read.rb:93:in `_read_attribute'

This PR tries to make the upgrade process works more smoothly.

pre rails 4.2 yaml for activerecord object have its attributes
defined as `Hash`, instead of `ActiveRecord::AttributeSet`,
which does not respond to fetch_value called internally by `result[name]`
@ignatiusreza
Copy link
Author

looks like the fault falls in rails side and is fixed by rails/rails@438662a

sorry for the noise..

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

Successfully merging this pull request may close these issues.

1 participant