public
Fork of rails/rails
Description: Ruby on Rails
Homepage: http://rubyonrails.org
Clone URL: git://github.com/ddollar/rails.git
Added documentation and fixed an ajax bug

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@974 
5ecf4fe2-1ee6-0310-87b1-e25e094e27de
dhh (author)
Tue Mar 22 04:33:47 -0800 2005
commit  4e60fe3ef3474834a9880f3cdd2a47f8efa99bc5
tree    acdd26f036976ecb3ded5adaf4b99c76f52cc899
parent  e1ce18020e1c23c148060ec2180dc0ed794be06e
...
1
 
2
3
 
4
5
6
...
 
1
2
 
3
4
5
6
0
@@ -1,6 +1,6 @@
0
-*SVN*
0
+*0.8.0* (22th March, 2005)
0
 
0
-* Added framework support for processing incoming emails with an Action Mailer class.
0
+* Added framework support for processing incoming emails with an Action Mailer class. See example in README.
0
 
0
 
0
 *0.7.1* (7th March, 2005)
...
1
 
2
3
4
...
13
14
15
16
 
17
18
19
20
 
21
22
23
...
 
1
2
3
4
...
13
14
15
 
16
17
18
19
 
20
21
22
23
0
@@ -1,4 +1,4 @@
0
-*SVN*
0
+*1.6.0* (22th March, 2005)
0
 
0
 * Added a JavascriptHelper and accompanying prototype.js library that opens the world of Ajax to Action Pack with a large array of options for dynamically interacting with an application without reloading the page #884 [Sam Stephenson/David]
0
 
0
@@ -13,11 +13,11 @@
0
         ...
0
         if @something.save
0
           # will redirect, use flash
0
- flash['message'] = 'Save successful'
0
+ flash[:message] = 'Save successful'
0
           redirect_to :action => 'list'
0
         else
0
           # no redirect, message is for current action, use flash.now
0
- flash.now['message'] = 'Save failed, review'
0
+ flash.now[:message] = 'Save failed, review'
0
           render_action 'edit'
0
         end
0
       end
...
2
3
4
5
6
7
8
9
 
 
 
 
 
 
 
 
 
 
10
11
12
...
63
64
65
 
 
 
 
66
67
68
...
2
3
4
 
 
 
 
 
5
6
7
8
9
10
11
12
13
14
15
16
17
...
68
69
70
71
72
73
74
75
76
77
0
@@ -2,11 +2,16 @@ require File.dirname(__FILE__) + '/tag_helper'
0
 
0
 module ActionView
0
   module Helpers
0
- # You must call <%= define_javascript_functions %> in your application,
0
- # or copy the included Javascript libraries into your application's
0
- # public/javascripts/ directory, before using these helpers.
0
- module JavascriptHelper
0
-
0
+ # Provides a set of helpers for calling Javascript functions and, most importantly, to call remote methods using what has
0
+ # been labelled Ajax[http://www.adaptivepath.com/publications/essays/archives/000385.php]. This means that you can call
0
+ # actions in your controllers without reloading the page, but still update certain parts of it using injections into the
0
+ # DOM. The common use case is having a form that adds a new element to a list without reloading the page.
0
+ #
0
+ # To be able to use the Javascript helpers, you must either call <%= define_javascript_functions %> (which returns all
0
+ # the Javascript support functions in a <script> block) or reference the Javascript library using
0
+ # <%= javascript_include_tag "prototype" %> (which looks for the library in /javascripts/prototype.js). The latter is
0
+ # recommended as the browser can then cache the library instead of fetching all the functions anew on every request.
0
+ module JavascriptHelper
0
       unless const_defined? :CALLBACKS
0
         CALLBACKS = [:uninitialized, :loading, :loaded, :interactive, :complete]
0
         JAVASCRIPT_PATH = File.join(File.dirname(__FILE__), 'javascripts')
0
@@ -63,6 +68,10 @@ module ActionView
0
         link_to_function(name, remote_function(options), html_options)
0
       end
0
 
0
+ # Returns a form tag that will submit using XMLHttpRequest in the background instead of the regular
0
+ # reloading POST arrangement. Even though it's using Javascript to serialize the form elements, the form submission
0
+ # will work just like a regular submission as viewed by the receiving side (all elements available in @params).
0
+ # The options for specifying the target with :url and defining callbacks is the same as link_to_remote.
0
       def form_remote_tag(options = {})
0
         options[:form] = true
0
 
...
288
289
290
291
 
292
293
294
...
288
289
290
 
291
292
293
294
0
@@ -288,7 +288,7 @@ Form.Element.Serializers = {
0
 
0
   select: function(element) {
0
     var index = element.selectedIndex;
0
- return [element.name, element.options[index].value];
0
+ return [element.name, (index >= 0) ? element.options[index].value : ''];
0
   }
0
 }
0
 
...
1
 
2
3
4
...
10
11
12
 
13
14
15
...
30
31
32
 
33
34
35
...
 
1
2
3
4
...
10
11
12
13
14
15
16
...
31
32
33
34
35
36
37
0
@@ -1,4 +1,4 @@
0
-*0.6.1* (Unreleased)
0
+*0.6.1* (22th March, 2005)
0
 
0
 * Fix that method response QNames mismatched with that declared in the WSDL, makes SOAP::WSDLDriverFactory work against AWS again
0
 
0
@@ -10,6 +10,7 @@
0
 
0
 * Fix that SOAP fault response fault code values were not QName's #804
0
 
0
+
0
 *0.6.0* (7th March, 2005)
0
 
0
 * Add action_controller/test_invoke, used for integrating AWS with the Rails testing infrastructure
0
@@ -30,6 +31,7 @@
0
 
0
 * Replace '::' with '..' in fully qualified type names for marshaling and WSDL. This improves interoperability with .NET, and closes #676.
0
 
0
+
0
 *0.5.0* (24th February, 2005)
0
 
0
   * lib/action_service/dispatcher*: replace "router" fragments with
...
288
289
290
291
 
292
293
294
...
288
289
290
 
291
292
293
294
0
@@ -288,7 +288,7 @@ Form.Element.Serializers = {
0
 
0
   select: function(element) {
0
     var index = element.selectedIndex;
0
- return [element.name, element.options[index].value];
0
+ return [element.name, (index >= 0) ? element.options[index].value : ''];
0
   }
0
 }
0
 

Comments

    No one has commented yet.