solidusio-contrib / solidus_reviews

Product review/rating functionality for your Solidus store.
BSD 3-Clause "New" or "Revised" License
19 stars 49 forks source link

Fix Rails warning about auto-loading Spree::ReviewsConfiguration again #108

Open marcrohloff opened 2 years ago

marcrohloff commented 2 years ago

Note: This is a re-submission of PR #98 which appears to have been reverted.

When starting a Rails app using Solidus Reviews the following is logged

Reloading does not reboot the application, and therefore code executed during
initialization does not run again. So, if you reload Spree::ReviewsConfiguration, for example,
the expected changes won't be reflected in that stale Class object.

This change uses the same styles as solidus_frontend and solidus_backend to load the configuration class.

pelargir commented 2 years ago

We're getting the same warning. +1 for merging this change.