Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #11057 (closed defect: fixed)

Opened 10 months ago

Last modified 10 months ago

[PATCH] render :partial problem with collections, records, and locals

Reported by: lotswholetime Assigned to: core
Priority: normal Milestone: 2.x
Component: ActionPack Version: edge
Severity: normal Keywords: render partial collection record locals
Cc:

Description

This patch fixes to bugs found in ActionView's render :partial implementation.

Here are the two problems:

render :partial => customer, :locals => { :greeting => greeting }

This results in the local variable "customer" being nil in the customer/_customer partial.

render :partial => customers, :locals => { :greeting => greeting }

This results on greeting not being defined in the customer/_customer partial.

Attachments

render_partial_fixes.diff (3.3 kB) - added by lotswholetime on 02/08/08 18:23:59.
render_partial_test_templates.diff (0.6 kB) - added by lotswholetime on 02/08/08 22:22:12.

Change History

02/08/08 18:23:59 changed by lotswholetime

  • attachment render_partial_fixes.diff added.

02/08/08 19:06:41 changed by danielmorrison

+1

02/08/08 22:05:17 changed by marcel

  • status changed from new to closed.
  • resolution set to fixed.

Applied in [8822]. Thanks!

02/08/08 22:22:12 changed by lotswholetime

  • attachment render_partial_test_templates.diff added.

02/08/08 22:24:47 changed by lotswholetime

  • status changed from closed to reopened.
  • resolution deleted.

It looks like the new templates for the tests did not get committed -- I added a patch with just those new templates in them.

02/08/08 22:38:04 changed by lotswholetime

  • status changed from reopened to closed.
  • resolution set to fixed.

Test templates added in [8823]