-
Notifications
You must be signed in to change notification settings - Fork 9
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
Support for Rails 6.1.1 #24
Comments
Do we actually need support for the new Rails? I was under impression that finally they did fix the bug. Can you check on your project? |
the original bug is finally closed: rails/rails#15185 |
I tried removing the gem from Gemfile, but it did not work out-of-the-box. I get an error about missing attribute. |
hm, can you then re-open original rails bugs? at least one of them. I'll try to take a look and fix it by the end of the week. |
Just to note, this is what the old version with the gem generates:
And rails 6.1.1 without the gem generates the following:
And with the latter I get: Missing attribute: responsible_user_id. |
It seems that the unwanted behaviour is caused by the LEFT OUTER JOIN + select below. For some reason, in Rails 6.1.1 the select() below causes all other "Task" attributes to be dropped from the select.
|
I managed to fix the problem by monkey patching a select_append() method to ActiveRecord::QueryMethods as described here: https://stackoverflow.com/questions/41399788/use-rails-select-to-add-not-overwrite-selected-attributes This fixed the problem. So it seems that the gem may really not be needed anymore. Anyway, thanks for the gem and your work maintaining it! It was a lifesaver when it was still needed. |
When running gem againts Rails 6.1.1, I get the following error and stack trace:
The line is:
The text was updated successfully, but these errors were encountered: