-
-
Notifications
You must be signed in to change notification settings - Fork 121
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
Autoload issue #225
Comments
Thanks for creating this issue. The context is really helpful. As I mentioned in the original PR over here, this issue is presumably caused by the load order causing the My assumption is currently that we need to do something to ensure that the module is available, but if we're at the point where we (@solidusio/core-team) are happy to remove paranoia support fully from solidus_auth_devise, we could go the route that you came up with in #223. |
solidusio/solidus_auth_devise#225 Scenario: I should be able to reload the app after changing a user decorator Given I am logged in When I go to the the account page Then I should see the value of UserDecorator#decoration When I change the value the UserDecorator#decoration And I refresh the account page Then I should see the new value
Hello @jtapia @jarednorman ! I'm not sure if there is still a need to reproduce the issue encountered here, but just the same, I tried it out, and I haven't been successful so far :) Please watch the video below of my test run: solidus-auth-devise-225-2022-07-27-manual-test.mp4You can find the test app at https://github.com/gsmendoza/rails_6141_store/tree/solidus_auth_devise_225. As I said in the video, if you have any suggestions on how I can update the app to reproduce the issue, please let me know. Thanks! |
I wonder if there's a reference to the user model somewhere in the apps of the people hitting this issue that's changing the order the classes get loaded or something. |
I re-visited this today, we had made a fork and removed that code which was causing us issues for the time being. This issue stopped presenting itself... I'm not really sure what was going on with the load order which was appearing to make this go wrong but I think it's safe to close this issue. |
I found that upgrading from the classic autoloader to Zeitwerk fixed this issue for me. |
Going to close this, if it happens again, feel free to comment! |
Adding this gem_dir = Gem::Specification.find_by_name("solidus_core").gem_dir
require "#{gem_dir}/app/models/concerns/spree/soft_deletable" |
Description
We upgraded
Solidus
from2.11
to3.1.0
and we have an user model decorator, after the upgrade we started noticiting that if change and reload any code related to user decorator, it triggers an autoload errorundefined local variable or method acts_as_paranoid for Spree::User:Class
for some reason here https://github.com/solidusio/solidus_auth_devise/blob/master/app/models/spree/user.rb#L11= is not finding the
Spree::SoftDeletable
module, tried to useacts_as_paranoid
but all the references were removed here 11b9fa9Gemfile
Decorator
Log
The text was updated successfully, but these errors were encountered: