-
-
Notifications
You must be signed in to change notification settings - Fork 315
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
Nested Elements Touching Parent #1389
Comments
A possible solution would be to leave things as they would in the default of rails
|
I agree that all our custom touching logic should be removed and we should let Rails handle that. Will work something out. |
@oniram88 I created a PR #1390 that removes our custom touching mechanism and let Rails handle most of the associations. Could you please test this in your app and check if this fixes your problem? Just add my fork/branch to your # Gemfile
gem 'alchemy_cms', github: 'tvdeyen/alchemy_cms', branch: 'rails-touching' and run |
Perfect, works great! |
Thanks for the feedback. You can now switch back to # Gemfile
gem 'alchemy_cms', github: 'AlchemyCMS/alchemy_cms', branch: 'master' |
I'm searching to reproduce an error but I can't figure it out.... i tested the same thing inside the dummy app and it's working fine:
I have an element with nested elements, and when the child element is changed the parent didn't receive the touch, i tested it in the console with: Alchemy::Element.find(8).touch (where 8 is the id of my nested element) and the parent node is will not update his updated_at:
If I change the Alchemy::Touching touch method so:
all will work correctly
All the elements are standard alchemy elements with alchemy essence:
This is my Gemfile.lock
Here the alchemy is linked to my local version of alchemy in sync with the current master, but I tested the same with the stable 4.0.0
I tested also to comment the Alchemy::Touching::touch method and making touch on the nested will update the parent element (obviously the other alchemy information will not update correctly):
what can I test/look for???
The text was updated successfully, but these errors were encountered: