Namespace
Methods
A
B
C
D
E
F
G
H
I
L
M
P
R
S
Y
Included Modules
Instance Public methods
accessing_action_name_in_template()
# File actionview/test/actionpack/controller/render_test.rb, line 201
def accessing_action_name_in_template
  render :inline =>  "<%= action_name %>"
end
accessing_controller_name_in_template()
# File actionview/test/actionpack/controller/render_test.rb, line 205
def accessing_controller_name_in_template
  render :inline =>  "<%= controller_name %>"
end
accessing_local_assigns_in_inline_template()
# File actionview/test/actionpack/controller/render_test.rb, line 300
def accessing_local_assigns_in_inline_template
  name = params[:local_name]
  render :inline => "<%= 'Goodbye, ' + local_name %>",
         :locals => { :local_name => name }
end
accessing_logger_in_template()
# File actionview/test/actionpack/controller/render_test.rb, line 197
def accessing_logger_in_template
  render :inline =>  "<%= logger.class %>"
end
accessing_params_in_template()
# File actionview/test/actionpack/controller/render_test.rb, line 296
def accessing_params_in_template
  render :inline => "Hello: <%= params[:name] %>"
end
accessing_params_in_template_with_layout()
# File actionview/test/actionpack/controller/render_test.rb, line 380
def accessing_params_in_template_with_layout
  render :layout => true, :inline =>  "Hello: <%= params[:name] %>"
end
accessing_request_in_template()
# File actionview/test/actionpack/controller/render_test.rb, line 193
def accessing_request_in_template
  render :inline =>  "Hello: <%= request.host %>"
end
action_talk_to_layout()
# File actionview/test/actionpack/controller/render_test.rb, line 446
def action_talk_to_layout
  # Action template sets variable that's picked up by layout
end
blank_response()

:ported:

# File actionview/test/actionpack/controller/render_test.rb, line 260
def blank_response
  render :text => ' '
end
builder_layout_test()

:ported:

# File actionview/test/actionpack/controller/render_test.rb, line 270
def builder_layout_test
  @name = nil
  render :action => "hello", :layout => "layouts/builder"
end
builder_partial_test()

:move: test this in Action View

# File actionview/test/actionpack/controller/render_test.rb, line 276
def builder_partial_test
  render :action => "hello_world_container"
end
conditional_hello()
# File actionpack/test/controller/render_test.rb, line 47
def conditional_hello
  if stale?(:last_modified => Time.now.utc.beginning_of_day, :etag => [:foo, 123])
    render :action => 'hello_world'
  end
end
conditional_hello_with_bangs()
# File actionpack/test/controller/render_test.rb, line 137
def conditional_hello_with_bangs
  render :action => 'hello_world'
end
conditional_hello_with_cache_control_headers()
# File actionpack/test/controller/render_test.rb, line 131
def conditional_hello_with_cache_control_headers
  response.headers['Cache-Control'] = 'no-transform'
  expires_now
  render :action => 'hello_world'
end
conditional_hello_with_expires_in()
# File actionpack/test/controller/render_test.rb, line 96
def conditional_hello_with_expires_in
  expires_in 60.1.seconds
  render :action => 'hello_world'
end
conditional_hello_with_expires_in_with_must_revalidate()
# File actionpack/test/controller/render_test.rb, line 106
def conditional_hello_with_expires_in_with_must_revalidate
  expires_in 1.minute, :must_revalidate => true
  render :action => 'hello_world'
end
conditional_hello_with_expires_in_with_public()
# File actionpack/test/controller/render_test.rb, line 101
def conditional_hello_with_expires_in_with_public
  expires_in 1.minute, :public => true
  render :action => 'hello_world'
end
conditional_hello_with_expires_in_with_public_and_must_revalidate()
# File actionpack/test/controller/render_test.rb, line 111
def conditional_hello_with_expires_in_with_public_and_must_revalidate
  expires_in 1.minute, :public => true, :must_revalidate => true
  render :action => 'hello_world'
end
conditional_hello_with_expires_in_with_public_with_more_keys()
# File actionpack/test/controller/render_test.rb, line 116
def conditional_hello_with_expires_in_with_public_with_more_keys
  expires_in 1.minute, :public => true, 's-maxage' => 5.hours
  render :action => 'hello_world'
end
conditional_hello_with_expires_in_with_public_with_more_keys_old_syntax()
# File actionpack/test/controller/render_test.rb, line 121
def conditional_hello_with_expires_in_with_public_with_more_keys_old_syntax
  expires_in 1.minute, :public => true, :private => nil, 's-maxage' => 5.hours
  render :action => 'hello_world'
end
conditional_hello_with_expires_now()
# File actionpack/test/controller/render_test.rb, line 126
def conditional_hello_with_expires_now
  expires_now
  render :action => 'hello_world'
end
conditional_hello_with_public_header()
# File actionpack/test/controller/render_test.rb, line 75
def conditional_hello_with_public_header
  if stale?(:last_modified => Time.now.utc.beginning_of_day, :etag => [:foo, 123], :public => true)
    render :action => 'hello_world'
  end
end
conditional_hello_with_public_header_and_expires_at()
# File actionpack/test/controller/render_test.rb, line 89
def conditional_hello_with_public_header_and_expires_at
  expires_in 1.minute
  if stale?(:last_modified => Time.now.utc.beginning_of_day, :etag => [:foo, 123], :public => true)
    render :action => 'hello_world'
  end
end
conditional_hello_with_public_header_with_record()
# File actionpack/test/controller/render_test.rb, line 81
def conditional_hello_with_public_header_with_record
  record = Struct.new(:updated_at, :cache_key).new(Time.now.utc.beginning_of_day, "foo/123")

  if stale?(record, :public => true)
    render :action => 'hello_world'
  end
end
conditional_hello_with_record()
# File actionpack/test/controller/render_test.rb, line 53
def conditional_hello_with_record
  record = Struct.new(:updated_at, :cache_key).new(Time.now.utc.beginning_of_day, "foo/123")

  if stale?(record)
    render :action => 'hello_world'
  end
end
default_render()
# File actionview/test/actionpack/controller/render_test.rb, line 322
def default_render
  @alternate_default_render ||= nil
  if @alternate_default_render
    @alternate_default_render.call
  else
    super
  end
end
double_redirect()
# File actionpack/test/controller/render_test.rb, line 156
def double_redirect
  redirect_to :action => "double_render"
  redirect_to :action => "double_render"
end
double_render()

:ported:

# File actionpack/test/controller/render_test.rb, line 151
def double_render
  render :text => "hello"
  render :text => "world"
end
dynamic_render()
# File actionpack/test/controller/render_test.rb, line 61
def dynamic_render
  render params[:id] # => String, AC:Params
end
dynamic_render_permit()
# File actionpack/test/controller/render_test.rb, line 65
def dynamic_render_permit
  render params[:id].permit(:file)
end
dynamic_render_with_file()
# File actionpack/test/controller/render_test.rb, line 69
def dynamic_render_with_file
  # This is extremely bad, but should be possible to do.
  file = params[:id] # => String, AC:Params
  render file: file
end
empty_partial_collection()
# File actionview/test/actionpack/controller/render_test.rb, line 575
def empty_partial_collection
  render :partial => "customer", :collection => []
end
formatted_html_erb()
# File actionview/test/actionpack/controller/render_test.rb, line 312
def formatted_html_erb
end
formatted_xml_erb()
# File actionview/test/actionpack/controller/render_test.rb, line 315
def formatted_xml_erb
end
greeting()
# File actionview/test/actionpack/controller/render_test.rb, line 255
def greeting
  # let's just rely on the template
end
handle_last_modified_and_etags()
# File actionpack/test/controller/render_test.rb, line 142
def handle_last_modified_and_etags
  fresh_when(:last_modified => Time.now.utc.beginning_of_day, :etag => [ :foo, 123 ])
end
head_and_return()
# File actionpack/test/controller/render_test.rb, line 234
def head_and_return
  head :ok and return
  raise 'should not reach this line'
end
head_created()
# File actionpack/test/controller/render_test.rb, line 190
def head_created
  head :created
end
head_created_with_application_json_content_type()
# File actionpack/test/controller/render_test.rb, line 194
def head_created_with_application_json_content_type
  head :created, :content_type => "application/json"
end
head_ok_with_image_png_content_type()
# File actionpack/test/controller/render_test.rb, line 198
def head_ok_with_image_png_content_type
  head :ok, :content_type => "image/png"
end
head_with_custom_header()
# File actionpack/test/controller/render_test.rb, line 222
def head_with_custom_header
  head :x_custom_header => "something"
end
head_with_integer_status()
# File actionpack/test/controller/render_test.rb, line 214
def head_with_integer_status
  head :status => params[:status].to_i
end
head_with_location_header()
# File actionpack/test/controller/render_test.rb, line 202
def head_with_location_header
  head :location => "/foo"
end
head_with_location_object()
# File actionpack/test/controller/render_test.rb, line 206
def head_with_location_object
  head :location => Customer.new("david", 1)
end
head_with_no_content()
# File actionpack/test/controller/render_test.rb, line 239
def head_with_no_content
  # Fill in the headers with dummy data to make
  # sure they get removed during the testing
  response.headers["Content-Type"] = "dummy"
  response.headers["Content-Length"] = 42

  head 204
end
head_with_status_code_first()
# File actionpack/test/controller/render_test.rb, line 230
def head_with_status_code_first
  head :forbidden, :x_custom_header => "something"
end
head_with_string_status()
# File actionpack/test/controller/render_test.rb, line 218
def head_with_string_status
  head :status => params[:status]
end
head_with_symbolic_status()
# File actionpack/test/controller/render_test.rb, line 210
def head_with_symbolic_status
  head :status => params[:status].intern
end
head_with_www_authenticate_header()
# File actionpack/test/controller/render_test.rb, line 226
def head_with_www_authenticate_header
  head 'WWW-Authenticate' => 'something'
end
heading()
# File actionpack/test/controller/render_test.rb, line 146
def heading
  head :ok
end
hello_in_a_string()
# File actionview/test/actionpack/controller/render_test.rb, line 291
def hello_in_a_string
  @customers = [ Customer.new("david"), Customer.new("mary") ]
  render :text => "How's there? " + render_to_string(:template => "test/list")
end
hello_world()
# File actionpack/test/controller/render_test.rb, line 44
def hello_world
end
hello_world_file()
# File actionview/test/actionpack/controller/render_test.rb, line 88
def hello_world_file
  render :file => File.expand_path("../../../fixtures/actionpack/hello", __FILE__), :formats => [:html]
end
hello_world_from_rxml_using_action()
# File actionpack/test/controller/render_test.rb, line 181
def hello_world_from_rxml_using_action
  render :action => "hello_world_from_rxml", :handlers => [:builder]
end
hello_world_from_rxml_using_template()

:deprecated:

# File actionpack/test/controller/render_test.rb, line 186
def hello_world_from_rxml_using_template
  render :template => "test/hello_world_from_rxml", :handlers => [:builder]
end
hello_world_with_layout_false()
# File actionview/test/actionpack/controller/render_test.rb, line 151
def hello_world_with_layout_false
  render :layout => false
end
index()
# File guides/bug_report_templates/action_controller_gem.rb, line 24
def index
  render text: 'Home'
end
layout_overriding_layout()
# File actionview/test/actionpack/controller/render_test.rb, line 351
def layout_overriding_layout
  render :action => "hello_world", :layout => "standard"
end
layout_test()

:ported:

# File actionview/test/actionpack/controller/render_test.rb, line 265
def layout_test
  render :action => "hello_world"
end
layout_test_with_different_layout()
# File actionview/test/actionpack/controller/render_test.rb, line 335
def layout_test_with_different_layout
  render :action => "hello_world", :layout => "standard"
end
layout_test_with_different_layout_and_string_action()
# File actionview/test/actionpack/controller/render_test.rb, line 339
def layout_test_with_different_layout_and_string_action
  render "hello_world", :layout => "standard"
end
layout_test_with_different_layout_and_symbol_action()
# File actionview/test/actionpack/controller/render_test.rb, line 343
def layout_test_with_different_layout_and_symbol_action
  render :hello_world, :layout => "standard"
end
missing_partial()
# File actionview/test/actionpack/controller/render_test.rb, line 583
def missing_partial
  render :partial => 'thisFileIsntHere'
end
partial()
# File actionview/test/actionpack/controller/render_test.rb, line 477
def partial
  render :partial => 'partial'
end
partial_collection()
# File actionview/test/actionpack/controller/render_test.rb, line 524
def partial_collection
  render :partial => "customer", :collection => [ Customer.new("david"), Customer.new("mary") ]
end
partial_collection_shorthand_with_different_types_of_records()
# File actionview/test/actionpack/controller/render_test.rb, line 564
def partial_collection_shorthand_with_different_types_of_records
  render :partial => [
      BadCustomer.new("mark"),
      GoodCustomer.new("craig"),
      BadCustomer.new("john"),
      GoodCustomer.new("zach"),
      GoodCustomer.new("brandon"),
      BadCustomer.new("dan") ],
    :locals => { :greeting => "Bonjour" }
end
partial_collection_shorthand_with_different_types_of_records_with_counter()
# File actionview/test/actionpack/controller/render_test.rb, line 579
def partial_collection_shorthand_with_different_types_of_records_with_counter
  partial_collection_shorthand_with_different_types_of_records
end
partial_collection_shorthand_with_locals()
# File actionview/test/actionpack/controller/render_test.rb, line 560
def partial_collection_shorthand_with_locals
  render :partial => [ Customer.new("david"), Customer.new("mary") ], :locals => { :greeting => "Bonjour" }
end
partial_collection_with_as()
# File actionview/test/actionpack/controller/render_test.rb, line 528
def partial_collection_with_as
  render :partial => "customer_with_var", :collection => [ Customer.new("david"), Customer.new("mary") ], :as => :customer
end
partial_collection_with_as_and_counter()
# File actionview/test/actionpack/controller/render_test.rb, line 544
def partial_collection_with_as_and_counter
  render :partial => "customer_counter_with_as", :collection => [ Customer.new("david"), Customer.new("mary") ], :as => :client
end
partial_collection_with_as_and_iteration()
# File actionview/test/actionpack/controller/render_test.rb, line 536
def partial_collection_with_as_and_iteration
  render partial: "customer_iteration_with_as", collection: [ Customer.new("david"), Customer.new("mary"), Customer.new('christine') ], as: :client
end
partial_collection_with_counter()
# File actionview/test/actionpack/controller/render_test.rb, line 540
def partial_collection_with_counter
  render :partial => "customer_counter", :collection => [ Customer.new("david"), Customer.new("mary") ]
end
partial_collection_with_iteration()
# File actionview/test/actionpack/controller/render_test.rb, line 532
def partial_collection_with_iteration
  render partial: "customer_iteration", collection: [ Customer.new("david"), Customer.new("mary"), Customer.new('christine') ]
end
partial_collection_with_locals()
# File actionview/test/actionpack/controller/render_test.rb, line 548
def partial_collection_with_locals
  render :partial => "customer_greeting", :collection => [ Customer.new("david"), Customer.new("mary") ], :locals => { :greeting => "Bonjour" }
end
partial_collection_with_spacer()
# File actionview/test/actionpack/controller/render_test.rb, line 552
def partial_collection_with_spacer
  render :partial => "customer", :spacer_template => "partial_only", :collection => [ Customer.new("david"), Customer.new("mary") ]
end
partial_collection_with_spacer_which_uses_render()
# File actionview/test/actionpack/controller/render_test.rb, line 556
def partial_collection_with_spacer_which_uses_render
  render :partial => "customer", :spacer_template => "partial_with_partial", :collection => [ Customer.new("david"), Customer.new("mary") ]
end
partial_formats_html()
# File actionview/test/actionpack/controller/render_test.rb, line 473
def partial_formats_html
  render :partial => 'partial', :formats => [:html]
end
partial_hash_collection()
# File actionview/test/actionpack/controller/render_test.rb, line 599
def partial_hash_collection
  render :partial => "hash_object", :collection => [ {:first_name => "Pratik"}, {:first_name => "Amy"} ]
end
partial_hash_collection_with_locals()
# File actionview/test/actionpack/controller/render_test.rb, line 603
def partial_hash_collection_with_locals
  render :partial => "hash_greeting", :collection => [ {:first_name => "Pratik"}, {:first_name => "Amy"} ], :locals => { :greeting => "Hola" }
end
partial_html_erb()
# File actionview/test/actionpack/controller/render_test.rb, line 481
def partial_html_erb
  render :partial => 'partial_html_erb'
end
partial_only()
# File actionview/test/actionpack/controller/render_test.rb, line 287
def partial_only
  render :partial => true
end
partial_with_counter()
# File actionview/test/actionpack/controller/render_test.rb, line 508
def partial_with_counter
  render :partial => "counter", :locals => { :counter_counter => 5 }
end
partial_with_form_builder()
# File actionview/test/actionpack/controller/render_test.rb, line 516
def partial_with_form_builder
  render :partial => ActionView::Helpers::FormBuilder.new(:post, nil, view_context, {})
end
partial_with_form_builder_subclass()
# File actionview/test/actionpack/controller/render_test.rb, line 520
def partial_with_form_builder_subclass
  render :partial => LabellingFormBuilder.new(:post, nil, view_context, {})
end
partial_with_hash_object()
# File actionview/test/actionpack/controller/render_test.rb, line 587
def partial_with_hash_object
  render :partial => "hash_object", :object => {:first_name => "Sam"}
end
partial_with_implicit_local_assignment()
# File actionview/test/actionpack/controller/render_test.rb, line 607
def partial_with_implicit_local_assignment
  @customer = Customer.new("Marcel")
  render :partial => "customer"
end
partial_with_locals()
# File actionview/test/actionpack/controller/render_test.rb, line 512
def partial_with_locals
  render :partial => "customer", :locals => { :customer => Customer.new("david") }
end
partial_with_nested_object()
# File actionview/test/actionpack/controller/render_test.rb, line 591
def partial_with_nested_object
  render :partial => "quiz/questions/question", :object => Quiz::Question.new("first")
end
partial_with_nested_object_shorthand()
# File actionview/test/actionpack/controller/render_test.rb, line 595
def partial_with_nested_object_shorthand
  render Quiz::Question.new("first")
end
partials_list()

:ported:

# File actionview/test/actionpack/controller/render_test.rb, line 281
def partials_list
  @test_unchanged = 'hello'
  @customers = [ Customer.new("david"), Customer.new("mary") ]
  render :action => "list"
end
render_action_hello_world()

:ported:

# File actionview/test/actionpack/controller/render_test.rb, line 124
def render_action_hello_world
  render :action => "hello_world"
end
render_action_hello_world_as_string()
# File actionview/test/actionpack/controller/render_test.rb, line 132
def render_action_hello_world_as_string
  render "hello_world"
end
render_action_hello_world_as_symbol()
# File actionview/test/actionpack/controller/render_test.rb, line 331
def render_action_hello_world_as_symbol
  render :action => :hello_world
end
render_action_hello_world_with_symbol()
# File actionview/test/actionpack/controller/render_test.rb, line 136
def render_action_hello_world_with_symbol
  render :action => :hello_world
end
render_action_upcased_hello_world()
# File actionview/test/actionpack/controller/render_test.rb, line 128
def render_action_upcased_hello_world
  render :action => "Hello_world"
end
render_and_redirect()
# File actionpack/test/controller/render_test.rb, line 161
def render_and_redirect
  render :text => "hello"
  redirect_to :action => "double_render"
end
render_call_to_partial_with_layout()
# File actionview/test/actionpack/controller/render_test.rb, line 612
def render_call_to_partial_with_layout
  render :action => "calling_partial_with_layout"
end
render_call_to_partial_with_layout_in_main_layout_and_within_content_for_layout()
# File actionview/test/actionpack/controller/render_test.rb, line 616
def render_call_to_partial_with_layout_in_main_layout_and_within_content_for_layout
  render :action => "calling_partial_with_layout", :layout => "layouts/partial_with_layout"
end
render_content_type_from_body()
# File actionview/test/actionpack/controller/render_test.rb, line 460
def render_content_type_from_body
  response.content_type = Mime::RSS
  render :text => "hello world!"
end
render_custom_code()

:ported:

# File actionview/test/actionpack/controller/render_test.rb, line 210
def render_custom_code
  render :text => "hello world", :status => 404
end
render_file_as_string_with_locals()
# File actionview/test/actionpack/controller/render_test.rb, line 188
def render_file_as_string_with_locals
  path = File.expand_path(File.join(File.dirname(__FILE__), '../../fixtures/test/render_file_with_locals'))
  render file: path, :locals => {:secret => 'in the sauce'}
end
render_file_from_template()
# File actionview/test/actionpack/controller/render_test.rb, line 178
def render_file_from_template
  @secret = 'in the sauce'
  @path = File.expand_path(File.join(File.dirname(__FILE__), '../../fixtures/test/render_file_with_ivar'))
end
render_file_not_using_full_path()

:ported:

# File actionview/test/actionpack/controller/render_test.rb, line 163
def render_file_not_using_full_path
  @secret = 'in the sauce'
  render :file => 'test/render_file_with_ivar'
end
render_file_not_using_full_path_with_dot_in_path()
# File actionview/test/actionpack/controller/render_test.rb, line 168
def render_file_not_using_full_path_with_dot_in_path
  @secret = 'in the sauce'
  render :file => 'test/dot.directory/render_file_with_ivar'
end
render_file_using_pathname()
# File actionview/test/actionpack/controller/render_test.rb, line 173
def render_file_using_pathname
  @secret = 'in the sauce'
  render :file => Pathname.new(File.dirname(__FILE__)).join('..', '..', 'fixtures', 'test', 'dot.directory', 'render_file_with_ivar')
end
render_file_with_instance_variables()

:ported:

# File actionview/test/actionpack/controller/render_test.rb, line 156
def render_file_with_instance_variables
  @secret = 'in the sauce'
  path = File.join(File.dirname(__FILE__), '../../fixtures/test/render_file_with_ivar')
  render :file => path
end
render_file_with_locals()
# File actionview/test/actionpack/controller/render_test.rb, line 183
def render_file_with_locals
  path = File.join(File.dirname(__FILE__), '../../fixtures/test/render_file_with_locals')
  render :file => path, :locals => {:secret => 'in the sauce'}
end
render_hello_world()

:ported:

# File actionview/test/actionpack/controller/render_test.rb, line 93
def render_hello_world
  render "test/hello_world"
end
render_hello_world_from_variable()

:ported:

# File actionview/test/actionpack/controller/render_test.rb, line 118
def render_hello_world_from_variable
  @person = "david"
  render :text => "hello #{@person}"
end
render_hello_world_with_forward_slash()

:ported: compatibility

# File actionview/test/actionpack/controller/render_test.rb, line 103
def render_hello_world_with_forward_slash
  render "/test/hello_world"
end
render_hello_world_with_last_modified_set()
# File actionview/test/actionpack/controller/render_test.rb, line 97
def render_hello_world_with_last_modified_set
  response.last_modified = Date.new(2008, 10, 10).to_time
  render "test/hello_world"
end
render_implicit_html_template_from_xhr_request()
# File actionview/test/actionpack/controller/render_test.rb, line 306
def render_implicit_html_template_from_xhr_request
end
render_implicit_js_template_without_layout()
# File actionview/test/actionpack/controller/render_test.rb, line 309
def render_implicit_js_template_without_layout
end
render_line_offset()
# File actionview/test/actionpack/controller/render_test.rb, line 247
def render_line_offset
  render :inline => '<% raise %>', :locals => {:foo => 'bar'}
end
render_nothing_with_appendix()

:ported:

# File actionview/test/actionpack/controller/render_test.rb, line 229
def render_nothing_with_appendix
  render :text => "appended"
end
render_template_in_top_directory()

:ported:

# File actionview/test/actionpack/controller/render_test.rb, line 108
def render_template_in_top_directory
  render :template => 'shared'
end
render_template_in_top_directory_with_slash()

:deprecated:

# File actionview/test/actionpack/controller/render_test.rb, line 113
def render_template_in_top_directory_with_slash
  render '/shared'
end
render_template_within_a_template_with_other_format()
# File actionview/test/actionpack/controller/render_test.rb, line 502
def render_template_within_a_template_with_other_format
  render  :template => "test/with_xml_template",
          :formats  => [:html],
          :layout   => "with_html_partial"
end
render_text_hello_world()

:ported:

# File actionview/test/actionpack/controller/render_test.rb, line 141
def render_text_hello_world
  render :text => "hello world"
end
render_text_hello_world_with_layout()

:ported:

# File actionview/test/actionpack/controller/render_test.rb, line 146
def render_text_hello_world_with_layout
  @variable_for_layout = ", I am here!"
  render :text => "hello world", :layout => true
end
render_text_with_assigns()

:addressed:

# File actionview/test/actionpack/controller/render_test.rb, line 451
def render_text_with_assigns
  @hello = "world"
  render :text => "foo"
end
render_text_with_false()

:ported:

# File actionview/test/actionpack/controller/render_test.rb, line 220
def render_text_with_false
  render :text => false
end
render_text_with_nil()

:ported:

# File actionview/test/actionpack/controller/render_test.rb, line 215
def render_text_with_nil
  render :text => nil
end
render_text_with_resource()
# File actionview/test/actionpack/controller/render_test.rb, line 224
def render_text_with_resource
  render :text => Customer.new("David")
end
render_to_string_and_render()
# File actionpack/test/controller/render_test.rb, line 166
def render_to_string_and_render
  @stuff = render_to_string :text => "here is some cached stuff"
  render :text => "Hi web users! #{@stuff}"
end
render_to_string_and_render_with_different_formats()
# File actionview/test/actionpack/controller/render_test.rb, line 497
def render_to_string_and_render_with_different_formats
  @html = render_to_string :template => "test/with_partial", :formats => [:html]
  render :template => "test/with_partial", :formats => [:text]
end
render_to_string_test()
# File actionview/test/actionpack/controller/render_test.rb, line 318
def render_to_string_test
  @foo = render_to_string :inline => "this is a test"
end
render_to_string_with_assigns()
# File actionview/test/actionpack/controller/render_test.rb, line 359
def render_to_string_with_assigns
  @before = "i'm before the render"
  render_to_string :text => "foo"
  @after = "i'm after the render"
  render :template => "test/hello_world"
end
render_to_string_with_caught_exception()
# File actionview/test/actionpack/controller/render_test.rb, line 370
def render_to_string_with_caught_exception
  @before = "i'm before the render"
  begin
    render_to_string :file => "exception that will be caught- hope my future instance vars still work!"
  rescue
  end
  @after = "i'm after the render"
  render :template => "test/hello_world"
end
render_to_string_with_exception()
# File actionview/test/actionpack/controller/render_test.rb, line 366
def render_to_string_with_exception
  render_to_string :file => "exception that will not be caught - this will certainly not work"
end
render_to_string_with_inline_and_render()
# File actionpack/test/controller/render_test.rb, line 171
def render_to_string_with_inline_and_render
  render_to_string :inline => "<%= 'dlrow olleh'.reverse %>"
  render :template => "test/hello_world"
end
render_to_string_with_partial()
# File actionview/test/actionpack/controller/render_test.rb, line 485
def render_to_string_with_partial
  @partial_only = render_to_string :partial => "partial_only"
  @partial_with_locals = render_to_string :partial => "customer", :locals => { :customer => Customer.new("david") }
  render :template => "test/hello_world"
end
render_to_string_with_template_and_html_partial()
# File actionview/test/actionpack/controller/render_test.rb, line 491
def render_to_string_with_template_and_html_partial
  @text = render_to_string :template => "test/with_partial", :formats => [:text]
  @html = render_to_string :template => "test/with_partial", :formats => [:html]
  render :template => "test/with_html_partial"
end
render_using_layout_around_block()
# File actionview/test/actionpack/controller/render_test.rb, line 465
def render_using_layout_around_block
  render :action => "using_layout_around_block"
end
render_using_layout_around_block_in_main_layout_and_within_content_for_layout()
# File actionview/test/actionpack/controller/render_test.rb, line 469
def render_using_layout_around_block_in_main_layout_and_within_content_for_layout
  render :action => "using_layout_around_block", :layout => "layouts/block_with_layout"
end
render_with_explicit_escaped_template()
# File actionview/test/actionpack/controller/render_test.rb, line 393
def render_with_explicit_escaped_template
  render :template => "test/hello,world"
end
render_with_explicit_string_template()
# File actionview/test/actionpack/controller/render_test.rb, line 397
def render_with_explicit_string_template
  render "test/hello_world"
end
render_with_explicit_template()

:ported:

# File actionview/test/actionpack/controller/render_test.rb, line 385
def render_with_explicit_template
  render :template => "test/hello_world"
end
render_with_explicit_template_with_locals()

:ported:

# File actionview/test/actionpack/controller/render_test.rb, line 402
def render_with_explicit_template_with_locals
  render :template => "test/render_file_with_locals", :locals => { :secret => 'area51' }
end
render_with_explicit_unescaped_template()
# File actionview/test/actionpack/controller/render_test.rb, line 389
def render_with_explicit_unescaped_template
  render :template => "test/h*llo_world"
end
render_with_filters()

Ensure that the before filter is executed before self.formats is set.

# File actionview/test/actionpack/controller/render_test.rb, line 625
def render_with_filters
  render :action => :formatted_xml_erb
end
render_xml_hello()

This test is testing 3 things:

render :file in AV      :ported:
render :template in AC  :ported:
setting content type
# File actionview/test/actionpack/controller/render_test.rb, line 237
def render_xml_hello
  @name = "David"
  render :template => "test/hello"
end
render_xml_hello_as_string_template()
# File actionview/test/actionpack/controller/render_test.rb, line 242
def render_xml_hello_as_string_template
  @name = "David"
  render "test/hello"
end
rendering_nothing_on_layout()
# File actionview/test/actionpack/controller/render_test.rb, line 355
def rendering_nothing_on_layout
  render :nothing => true
end
rendering_with_conflicting_local_vars()
# File actionpack/test/controller/render_test.rb, line 176
def rendering_with_conflicting_local_vars
  @name = "David"
  render :action => "potential_conflicts"
end
rendering_without_layout()
# File actionview/test/actionpack/controller/render_test.rb, line 347
def rendering_without_layout
  render :action => "hello_world", :layout => false
end
send_mail()
# File actionmailer/test/i18n_with_controller_test.rb, line 19
def send_mail
  email = I18nTestMailer.mail_with_i18n_subject("test@localhost").deliver_now
  render text: "Mail sent - Subject: #{email.subject}"
end
yield_content_for()
# File actionview/test/actionpack/controller/render_test.rb, line 456
def yield_content_for
  render :action => "content_for", :layout => "yield"
end