aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/console_app.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2006-03-03 03:00:55 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2006-03-03 03:00:55 +0000
commit94725b02bcc5e623dcbe1d73d57b2ede2c88440e (patch)
treea86f21947630793c2808d463822f01ac0024f383 /railties/lib/console_app.rb
parente9d6429ad32bc714061b8a80b0bb1575cb143ce7 (diff)
downloadrails-94725b02bcc5e623dcbe1d73d57b2ede2c88440e.tar.gz
rails-94725b02bcc5e623dcbe1d73d57b2ede2c88440e.tar.bz2
rails-94725b02bcc5e623dcbe1d73d57b2ede2c88440e.zip
Added reload! method to script/console to reload all models and others 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
Diffstat (limited to 'railties/lib/console_app.rb')
-rw-r--r--railties/lib/console_app.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/railties/lib/console_app.rb b/railties/lib/console_app.rb
index 6e30b0ef30..d03cdd352a 100644
--- a/railties/lib/console_app.rb
+++ b/railties/lib/console_app.rb
@@ -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 \ No newline at end of file