Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added reload! method to script/console to reload all models and other…

…s that include Reloadable without quitting the console (closes #4056) [esad@esse.at]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3749 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit 94725b02bcc5e623dcbe1d73d57b2ede2c88440e 1 parent e9d6429
David Heinemeier Hansson dhh authored
Showing with 8 additions and 0 deletions.
  1. +2 −0  railties/CHANGELOG
  2. +6 −0 railties/lib/console_app.rb
2  railties/CHANGELOG
View
@@ -1,5 +1,7 @@
*SVN*
+* Added reload! method to script/console to reload all models and others that include Reloadable without quitting the console #4056 [esad@esse.at]
+
* Added that rake rails:freeze:edge will now just export all the contents of the frameworks instead of just lib, so stuff like rails:update:scripts, rails:update:javascripts, and script/server on lighttpd still just works #4047 [DHH]
* Added fix for upload problems with lighttpd from Safari/IE to config/lighttpd.conf #3999 [thijs@fngtps.com]
6 railties/lib/console_app.rb
View
@@ -22,4 +22,10 @@ def new_session
session = ActionController::Integration::Session.new
yield session if block_given?
session
+end
+
+#reloads the environment
+def reload!
+ puts "Reloading..."
+ Dispatcher.reset_application!
end
Please sign in to comment.
Something went wrong with that request. Please try again.