diff options
author | Rick Olson <technoweenie@gmail.com> | 2006-03-08 05:21:27 +0000 |
---|---|---|
committer | Rick Olson <technoweenie@gmail.com> | 2006-03-08 05:21:27 +0000 |
commit | 043bee3338c83b0c409b5217d2f83aa732c0871a (patch) | |
tree | 6695d3bb45f03fc78ddb3dd2cf973824641035de /actionpack/test/controller | |
parent | 3c78d0b1ebfa87dfb80b8ac005554ece49cf2e34 (diff) | |
download | rails-043bee3338c83b0c409b5217d2f83aa732c0871a.tar.gz rails-043bee3338c83b0c409b5217d2f83aa732c0871a.tar.bz2 rails-043bee3338c83b0c409b5217d2f83aa732c0871a.zip |
Re-added mixed-in helper methods for the JavascriptGenerator. Moved JavascriptGenerators methods to a module that is mixed in after the helpers are added. Also fixed that variables set in the enumeration methods like #collect are set correctly. Documentation added for the enumeration methods [Rick Olson].
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3814 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r-- | actionpack/test/controller/new_render_test.rb | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/actionpack/test/controller/new_render_test.rb b/actionpack/test/controller/new_render_test.rb index febb4023d3..2701b6a462 100644 --- a/actionpack/test/controller/new_render_test.rb +++ b/actionpack/test/controller/new_render_test.rb @@ -9,6 +9,12 @@ module Fun end end +module NewRenderTestHelper + def rjs_helper_method_from_module + page.visual_effect :highlight + end +end + class NewRenderTestController < ActionController::Base layout :determine_layout @@ -178,11 +184,18 @@ class NewRenderTestController < ActionController::Base render :action => "potential_conflicts" end + helper NewRenderTestHelper + helper do + def rjs_helper_method(value) + page.visual_effect :highlight, value + end + end + def enum_rjs_test render :update do |page| page.select('.product').each do |value| - page.visual_effect :highlight - page.visual_effect :highlight, value + page.rjs_helper_method_from_module + page.rjs_helper_method(value) page.sortable(value, :url => { :action => "order" }) page.draggable(value) end |