static public Method

Dispatcher.reset_application!

Reset the application by clearing out loaded controllers, views, actions, mailers, and so forth. This allows them to be loaded again without having to restart the server (WEBrick, FastCGI, etc.).

Source Code

# File dispatcher.rb, line 57
def reset_application!
  ActiveRecord::Base.reset_subclasses if defined?(ActiveRecord)

  Dependencies.clear
  ActiveSupport::Deprecation.silence do # TODO: Remove after 1.2
    Class.remove_class(*Reloadable.reloadable_classes)
  end

  ActiveRecord::Base.clear_reloadable_connections! if defined?(ActiveRecord)
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.