Git Product home page Git Product logo

Comments (5)

JDutil avatar JDutil commented on August 16, 2024

It may or may not help to try removing the spring gem we've been having all sorts of code reloading issues from it, and removing spring generally solves the problems although not sure if this ones related at all.

from spree_shared.

romul avatar romul commented on August 16, 2024

@JDutil No, this one isn't related to spring. It is because of https://github.com/spree-contrib/spree_shared/blob/master/lib/spree_shared/spree_preferences_extensions.rb
But I don't really understand why not 97008d3
Do you have any insights?

from spree_shared.

romul avatar romul commented on August 16, 2024

On the one hand such eager loading can help to override behavior of some initializers (who knows which ones?). But on the second hand, it looks like nonsense, b/c we set Apartment::Tenant.current_tenant from request subdomain, so in all initializers it will be just 'public'.

from spree_shared.

JDutil avatar JDutil commented on August 16, 2024

I'm not really sure this extension was written by someone else, and I've just done some upgrades to it as necessary. I think your changes look fine, but would be good to test them out. It looks like the initial code was done back in 2012:
e1c5401

There probably just wasn't as clear of best practices when writing extensions then.

from spree_shared.

romul avatar romul commented on August 16, 2024

I've figured out the reason of this strange preloading. That was needed for specs, but the same result can be achieved with help of regular eager loading: https://github.com/spree-contrib/spree_shared/blob/3-0-stable/lib/spree_shared/engine.rb#L10..L12

from spree_shared.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.