You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sorry I don't have a specific example to replicate the issue at the moment, but will update if I get one in a non-client project.
We've run into a bug where occasionally methods wrapped in durably_decorate don't get reloaded in dev environment with how Rails 4.1 is eager loading models. This results in durably_decorated methods to get ignored when the model is reloaded.
So for example we had decorated devise controller authentication to require people to enter their password if it's been more than 15 minutes since they last entered it similar to Amazon. Things work great having durably_decorated the authentication method, but then after awhile all of the sudden the decorated method is no longer executed and the original behavior takes over again. Once you restart the web server the decorator is picked up again and continues working fine for awhile. Then stops again. Removing durably_decorate and simply overriding the method in the decorator appears to resolve the problem from occurring anymore.
I think this may be related to Rails 4.1.x now using spring or changes to the eager loading process for dev environment. The problem doesn't happen in production environment at all so it seems to be an issue with durable decorator not getting executed whenever a class gets reloaded during dev.
The text was updated successfully, but these errors were encountered:
Sorry I don't have a specific example to replicate the issue at the moment, but will update if I get one in a non-client project.
We've run into a bug where occasionally methods wrapped in durably_decorate don't get reloaded in dev environment with how Rails 4.1 is eager loading models. This results in durably_decorated methods to get ignored when the model is reloaded.
So for example we had decorated devise controller authentication to require people to enter their password if it's been more than 15 minutes since they last entered it similar to Amazon. Things work great having durably_decorated the authentication method, but then after awhile all of the sudden the decorated method is no longer executed and the original behavior takes over again. Once you restart the web server the decorator is picked up again and continues working fine for awhile. Then stops again. Removing durably_decorate and simply overriding the method in the decorator appears to resolve the problem from occurring anymore.
I think this may be related to Rails 4.1.x now using spring or changes to the eager loading process for dev environment. The problem doesn't happen in production environment at all so it seems to be an issue with durable decorator not getting executed whenever a class gets reloaded during dev.
The text was updated successfully, but these errors were encountered: