Comments (5)
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.
@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.
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.
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.
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)
- Preferences should not be shared between stores HOT 6
- load seed not working HOT 3
- Cannot install spree_shared gem HOT 3
- Error while running bundle exec rake spree_shared:bootstrap['store1'] HOT 1
- Rake aborted
- URLs sometimes get an IP instead of a tenant's subdomain HOT 3
- Problem customizing tenant identifier in image paths
- How do we handle separate assets per store with this approach? HOT 1
- Seed and sample data problem when using Spree 4.3 on Heroku
- Can we add spree emails to this gem? HOT 1
- Install ontop of latest spree_starter template results in caching namespace race condition? on production/heroku with MEMCACHEDCLOUD_SERVERS populated
- Adding new stores HOT 3
- Error on spree_shared:bootstrap task HOT 1
- How do I disable SSL in production with this gem? HOT 4
- Bootstrap rake task error: undefined method `change_paths' on Spree 3.0 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spree_shared.