public
Description: response for lets you decorate your actions respond_to blocks
Homepage: http://blog.ardes.com/response_for
Clone URL: git://github.com/ianwhite/response_for.git
Click here to lend your support to: response_for and make a donation at www.pledgie.com !
Changed API in app

response_for (outside actions)
response (inside actions)
ianwhite (author)
Tue Sep 09 21:19:33 -0700 2008
commit  64e4e9efdb54187596c34d2b877544faa292ea0a
tree    3ae2307cfeb30800cc21859f11d99ef8e79383b0
parent  0aeceda2938d3c2b2639e43776fac300729ebebd
...
1
2
3
4
 
5
6
7
8
9
10
11
 
12
13
14
15
16
 
17
18
19
...
1
2
3
 
4
5
6
7
8
9
10
 
11
12
13
14
15
 
16
17
18
19
0
@@ -1,19 +1,19 @@
0
 class FooController < ApplicationController
0
   def foo
0
     @foo = "Foo"
0
-    respond_to do |format|
0
+    response do |format|
0
       format.html {}
0
     end
0
   end
0
   
0
   # testing that erase_render_results works as expected
0
   def bar
0
-    respond_to(:json)
0
+    response :json
0
     erase_render_results
0
   end
0
   
0
   def baz
0
-    # no respond_to block in here, but we can still supplu one with response_for
0
+    # no response block in here, but we can still supply one with response_for
0
   end
0
 end
0
 

Comments