aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2008-06-05 13:25:33 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2008-06-05 13:25:33 -0700
commite7f1556d0e75c635212273cc5e3cfd113456ff29 (patch)
tree39e81a1fa01bacb18eb2c396d845ebcd815055b9 /actionpack/lib/action_view
parent53bcbfbdc1eed45cc6615e59d36baf018ab43d96 (diff)
parentdf8154c845f8fb251c58f1fd882cc221cfdcbbc2 (diff)
downloadrails-e7f1556d0e75c635212273cc5e3cfd113456ff29.tar.gz
rails-e7f1556d0e75c635212273cc5e3cfd113456ff29.tar.bz2
rails-e7f1556d0e75c635212273cc5e3cfd113456ff29.zip
Merge branch 'master' into erbout
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r--actionpack/lib/action_view/helpers/prototype_helper.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/actionpack/lib/action_view/helpers/prototype_helper.rb b/actionpack/lib/action_view/helpers/prototype_helper.rb
index ed2abba17a..a7c3b9ddc3 100644
--- a/actionpack/lib/action_view/helpers/prototype_helper.rb
+++ b/actionpack/lib/action_view/helpers/prototype_helper.rb
@@ -868,6 +868,16 @@ module ActionView
record "window.location.href = #{url.inspect}"
end
+ # Reloads the browser's current +location+ using JavaScript
+ #
+ # Examples:
+ #
+ # # Generates: window.location.reload();
+ # page.reload
+ def reload
+ record 'window.location.reload()'
+ end
+
# Calls the JavaScript +function+, optionally with the given +arguments+.
#
# If a block is given, the block will be passed to a new JavaScriptGenerator;