Ticket #358 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

render partial with named local raises undefined method

Reported by: yere..@gmail.com Assigned to: somebody
Priority: trivial Milestone: The Future
Component: Views Keywords:
Cc:

Description

c.partial "partials/..@engine}", :yo => nil

Instead of providing nil to the calling partial via yo, the following raises undefined method.

Spec and patch attached.

Attachments

render_partial_nil_local.diff (1.6 kB) - added by yere..@gmail.com on 12/12/07 23:25:29.

Change History

12/12/07 23:25:29 changed by yere..@gmail.com

  • attachment render_partial_nil_local.diff added.

12/12/07 23:28:25 changed by yere..@gmail.com

  • summary changed from render partial with nil named local raises undefined method to render partial with named local raises undefined method.

Also, I noticed that the partial being used to spec for erubis is different to the partials for haml and markaby. I went for consistency and patched the partial for erubis.

12/13/07 00:02:24 changed by e.@brainspl.at

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

(In [1086]) don't raise if names local on a partial is nil. closes #358