diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2008-06-05 13:25:33 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-06-05 13:25:33 -0700 |
commit | e7f1556d0e75c635212273cc5e3cfd113456ff29 (patch) | |
tree | 39e81a1fa01bacb18eb2c396d845ebcd815055b9 /actionpack/lib/action_view/helpers | |
parent | 53bcbfbdc1eed45cc6615e59d36baf018ab43d96 (diff) | |
parent | df8154c845f8fb251c58f1fd882cc221cfdcbbc2 (diff) | |
download | rails-e7f1556d0e75c635212273cc5e3cfd113456ff29.tar.gz rails-e7f1556d0e75c635212273cc5e3cfd113456ff29.tar.bz2 rails-e7f1556d0e75c635212273cc5e3cfd113456ff29.zip |
Merge branch 'master' into erbout
Diffstat (limited to 'actionpack/lib/action_view/helpers')
-rw-r--r-- | actionpack/lib/action_view/helpers/prototype_helper.rb | 10 |
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; |