Skip to content

Commit

Permalink
[padrino-core] Reset app dependencies so we are able to load correctl…
Browse files Browse the repository at this point in the history
…y new controllers/helpers/mailers.
  • Loading branch information
DAddYE committed May 20, 2011
1 parent f1fdc23 commit abd3715
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions padrino-core/lib/padrino-core/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ def new(*args, &bk)
#
def reload!
logger.devel "Reloading #{self}"
@_dependencies = nil # Reset dependencies
reset! # Reset sinatra app
reset_routes! # Remove all existing user-defined application routes
Padrino.require_dependencies(self.app_file, :force => true) # Reload the app file
Expand Down
4 changes: 2 additions & 2 deletions padrino-core/lib/padrino-core/support_lite.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module ObjectSpace
class << self
# Returns all the classes in the object space.
def classes
ObjectSpace.each_object(Module).map.select do |klass|
ObjectSpace.each_object(Module).select do |klass|
Class.class_eval { klass } rescue false
end
end
Expand Down Expand Up @@ -64,4 +64,4 @@ def self.glob_require(glob_pattern, file_path=nil)
##
# Loads our locale configuration files
#
I18n.load_path += Dir["#{File.dirname(__FILE__)}/locale/*.yml"] if defined?(I18n)
I18n.load_path += Dir["#{File.dirname(__FILE__)}/locale/*.yml"] if defined?(I18n)

0 comments on commit abd3715

Please sign in to comment.