# File test/render_other_test.rb, line 14 def self.controller_path 'test' end
# File test/render_other_test.rb, line 66 def delete_with_js @project_id = 4 end
# File test/render_other_test.rb, line 33 def enum_rjs_test render :update do |page| page.select('.product').each do |value| page.rjs_helper_method_from_module page.rjs_helper_method(value) page.sortable(value, :url => { :action => "order" }) page.draggable(value) end end end
# File test/render_other_test.rb, line 92 def partial_as_rjs render :update do |page| page.replace :foo, :partial => 'partial' end end
# File test/render_other_test.rb, line 108 def render_alternate_default # For this test, the method "default_render" is overridden: @alternate_default_render = lambda do render :update do |page| page.replace :foo, :partial => 'partial' end end end
# File test/render_other_test.rb, line 47 def render_custom_code_rjs render :update, :status => 404 do |page| page.replace :foo, :partial => 'partial' end end
# File test/render_other_test.rb, line 44 def render_explicit_html_template end
# File test/render_other_test.rb, line 53 def render_implicit_html_template end
# File test/render_other_test.rb, line 61 def render_js_with_explicit_action_template @project_id = 4 render :action => 'delete_with_js' end
# File test/render_other_test.rb, line 56 def render_js_with_explicit_template @project_id = 4 render :template => 'test/delete_with_js' end
# File test/render_other_test.rb, line 117 def render_simon_says render :simon => "foo" end
# File test/render_other_test.rb, line 98 def respond_to_partial_as_rjs respond_to do |format| format.js do render :update do |page| page.replace :foo, :partial => 'partial' end end end end
# File test/render_other_test.rb, line 28 def rjs_helper_method(value) page.visual_effect :highlight, value end
# File test/render_other_test.rb, line 70 def update_page render :update do |page| page.replace_html 'balance', '$37,000,000.00' page.visual_effect :highlight, 'balance' end end
# File test/render_other_test.rb, line 77 def update_page_with_instance_variables @money = '$37,000,000.00' @div_id = 'balance' render :update do |page| page.replace_html @div_id, @money page.visual_effect :highlight, @div_id end end
# File test/render_other_test.rb, line 86 def update_page_with_view_method render :update do |page| page.replace_html 'person', pluralize(2, 'person') end end
# File test/render_other_test.rb, line 122 def default_render @alternate_default_render ||= nil if @alternate_default_render @alternate_default_render.call else super end end
# File test/render_other_test.rb, line 131 def determine_layout case action_name when "hello_world", "layout_test", "rendering_without_layout", "rendering_nothing_on_layout", "render_text_hello_world", "render_text_hello_world_with_layout", "hello_world_with_layout_false", "partial_only", "partial_only_with_layout", "accessing_params_in_template", "accessing_params_in_template_with_layout", "render_with_explicit_template", "render_with_explicit_string_template", "update_page", "update_page_with_instance_variables" "layouts/standard" when "action_talk_to_layout", "layout_overriding_layout" "layouts/talk_from_action" when "render_implicit_html_template_from_xhr_request" (request.xhr? ? 'layouts/xhr' : 'layouts/standard') end end