Permalink
Browse files

Alters the load order so code is loaded before the frameworks, like m…

…odel or mailer (#752)

Fix #751
  • Loading branch information...
mereghost authored and jodosha committed Mar 17, 2017
1 parent eed9ccb commit 76ea8c7dd28d1aa1032bd0b60fa2d56fd617311b
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/hanami/components/components.rb
@@ -13,7 +13,7 @@ module Components # rubocop:disable Metrics/ModuleLength
# @since 0.9.0
# @api private
register 'all' do
requires 'logger', 'mailer', 'code', 'model', 'apps', 'finalizers'
requires 'logger', 'code', 'mailer', 'model', 'apps', 'finalizers'

resolve { true }
end
@@ -55,7 +55,7 @@ module Components # rubocop:disable Metrics/ModuleLength
run do
directory = Hanami.root.join('lib')

if Hanami.code_reloading?
if Components['environment'].code_reloading?
Utils.reload!(directory)
else
Utils.require!(directory)

0 comments on commit 76ea8c7

Please sign in to comment.