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

noreply at rubyforge.org noreply at rubyforge.org
Thu Nov 30 01:21:58 EST 2006


Bugs item #6981, was opened at 2006-11-30 15: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: Open
Resolution: None
Priority: 3
Submitted By: Kyosuke MOROHASHI (moro)
Assigned to: Nobody (None)
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>


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

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