Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix rails 5 reload issue, fixed #193
  • Loading branch information
eniwito committed Apr 25, 2017
1 parent 874031b commit fafcc2f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/spree_social/engine.rb
Expand Up @@ -12,6 +12,16 @@ class Engine < Rails::Engine

config.autoload_paths += %W(#{config.root}/lib)

# Resolves omniauth_callback error on development env
# See https://github.com/spree-contrib/spree_social/issues/193#issuecomment-296585601
if Rails::VERSION::MAJOR == 5
initializer 'main_app.auto_load' do |app|
Rails.application.reloader.to_run(:before) do
Rails.application.reloader.prepare!
end
end
end

initializer 'spree_social.environment', before: 'spree.environment' do
Spree::SocialConfig = Spree::SocialConfiguration.new
end
Expand Down

0 comments on commit fafcc2f

Please sign in to comment.