Permalink
Browse files

Merge pull request #1449 from padrino/fix-loading-order

Fixed the loading order of an app's dependencies.
  • Loading branch information...
ujifgc committed Oct 11, 2013
2 parents d64144f + d3592c5 commit 97e21d8364dac600de935381871214e1829b1a74
Showing with 2 additions and 2 deletions.
  1. +2 −2 padrino-core/lib/padrino-core/loader.rb
@@ -57,7 +57,7 @@ def load!
require_dependencies("#{root}/config/database.rb")
Reloader.lock!
before_load.each(&:call)
- dependency_paths.each{ |path| require_dependencies(path) }
+ require_dependencies(*dependency_paths)
after_load.each(&:call)
logger.devel "Loaded Padrino in #{Time.now - began_at} seconds"
Thread.current[:padrino_loaded] = true
@@ -211,12 +211,12 @@ def load_paths_was
def dependency_paths_was
@_dependency_paths_was ||= [
- "#{root}/config/apps.rb",
"#{root}/config/database.rb",
"#{root}/lib/**/*.rb",
"#{root}/models/**/*.rb",
"#{root}/shared/lib/**/*.rb",
"#{root}/shared/models/**/*.rb",
+ "#{root}/config/apps.rb"
].freeze
end
end

0 comments on commit 97e21d8

Please sign in to comment.