From 4e60fe3ef3474834a9880f3cdd2a47f8efa99bc5 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Tue, 22 Mar 2005 12:33:47 +0000 Subject: Added documentation and fixed an ajax bug git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@974 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- .../lib/action_view/helpers/javascript_helper.rb | 19 ++++++++++++++----- .../lib/action_view/helpers/javascripts/prototype.js | 2 +- 2 files changed, 15 insertions(+), 6 deletions(-) (limited to 'actionpack/lib/action_view/helpers') diff --git a/actionpack/lib/action_view/helpers/javascript_helper.rb b/actionpack/lib/action_view/helpers/javascript_helper.rb index 2e169b0f62..99b2fc1166 100644 --- a/actionpack/lib/action_view/helpers/javascript_helper.rb +++ b/actionpack/lib/action_view/helpers/javascript_helper.rb @@ -2,11 +2,16 @@ require File.dirname(__FILE__) + '/tag_helper' module ActionView module Helpers - # You must call <%= define_javascript_functions %> in your application, - # or copy the included Javascript libraries into your application's - # public/javascripts/ directory, before using these helpers. - module JavascriptHelper - + # Provides a set of helpers for calling Javascript functions and, most importantly, to call remote methods using what has + # been labelled Ajax[http://www.adaptivepath.com/publications/essays/archives/000385.php]. This means that you can call + # actions in your controllers without reloading the page, but still update certain parts of it using injections into the + # DOM. The common use case is having a form that adds a new element to a list without reloading the page. + # + # To be able to use the Javascript helpers, you must either call <%= define_javascript_functions %> (which returns all + # the Javascript support functions in a