[rspec-devel] [ rspec-Bugs-6981 ] helper method is not available in partial template.

noreply at rubyforge.org noreply at rubyforge.org
Thu Nov 30 08:13:49 EST 2006


Bugs item #6981, was opened at 2006-11-30 06:21
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=6981&group_id=797

Category: rails plugin
Group: None
>Status: Closed
>Resolution: Accepted
Priority: 3
Submitted By: Kyosuke MOROHASHI (moro)
>Assigned to: David Chelimsky (dchelimsky)
Summary: helper method is not available in partial template.

Initial Comment:
a helper method called in partially rendered in other view template does not work.

for example, test for the view below is fails with message 
"undefined local variable or method `person_address_text_field' for #<#<Class:0x360211c>:0x35e2a38>"

Index: vendor/rspec_on_rails/app/views/person/_person.rhtml
===================================================================
---  vendor/rspec_on_rails/app/views/person/_person.rhtml        (revision 1180)
+++ vendor/rspec_on_rails/app/views/person/_person.rhtml        (working copy)@@ -1 +1,2 @@
-<li><%=person.name %></li>
+<li><%= person.name %><span><%= person_address_text_field %></li>


----------------------------------------------------------------------

>Comment By: David Chelimsky (dchelimsky)
Date: 2006-11-30 13:13

Message:
Fixed in trunk (rev 1181)

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=6981&group_id=797


More information about the rspec-devel mailing list