aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack')
-rwxr-xr-xactionpack/README9
-rw-r--r--actionpack/lib/action_view/helpers/javascript_helper.rb3
2 files changed, 12 insertions, 0 deletions
diff --git a/actionpack/README b/actionpack/README
index 5d928dfa70..7c7526a9e9 100755
--- a/actionpack/README
+++ b/actionpack/README
@@ -168,6 +168,15 @@ A short rundown of the major features:
{Learn more}[link:classes/ActionController/Base.html]
+* Javascript and Ajax integration.
+
+ link_to_function "Greeting", "alert('Hello world!')"
+ link_to_remote "Delete this post", :update => "posts",
+ :url => { :action => "destroy", :id => post.id }
+
+ {Learn more}[link:classes/ActionView/Helpers/JavascriptHelper.html]
+
+
* Easy testing of both controller and template result through TestRequest/Response
class LoginControllerTest < Test::Unit::TestCase
diff --git a/actionpack/lib/action_view/helpers/javascript_helper.rb b/actionpack/lib/action_view/helpers/javascript_helper.rb
index 99b2fc1166..079ec736a1 100644
--- a/actionpack/lib/action_view/helpers/javascript_helper.rb
+++ b/actionpack/lib/action_view/helpers/javascript_helper.rb
@@ -11,6 +11,9 @@ module ActionView
# the Javascript support functions in a <script> block) or reference the Javascript library using
# <%= javascript_include_tag "prototype" %> (which looks for the library in /javascripts/prototype.js). The latter is
# recommended as the browser can then cache the library instead of fetching all the functions anew on every request.
+ #
+ # If you're the visual type, there's an Ajax movie[http://www.rubyonrails.com/media/video/rails-ajax.mov] demonstrating
+ # the use of form_remote_tag.
module JavascriptHelper
unless const_defined? :CALLBACKS
CALLBACKS = [:uninitialized, :loading, :loaded, :interactive, :complete]