# Undefined method error despite the fact it doesn't exist

**URL:** <https://www.ruby-forum.com/t/undefined-method-error-despite-the-fact-it-doesnt-exist/185376>\
**Category:** Rails\
**Created:** [March 19, 2010, 12:43am UTC](https://www.ruby-forum.com/t/undefined-method-error-despite-the-fact-it-doesnt-exist/185376 "2010-03-19T00:43:50Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmaenpaa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9de053/32.png) [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Post date:** [March 19, 2010, 12:43am UTC](https://www.ruby-forum.com/t/undefined-method-error-despite-the-fact-it-doesnt-exist/185376/1 "2010-03-19T00:43:50Z")

</div>

Hey all,

I’m getting a strange, unexplainable error. It returns undefined method  
`render\_index\_row\_action\_pprove’. I performed a search on my entire  
application and no such method exists. There is a  
render\_index\_row\_action\_approve but not a  
render\_index\_row\_action\_pprove.

NoMethodError in Student\_requests#index

Showing app/views/resources/index.html.haml where line #20 raised:

undefined method `render\_index\_row\_action\_pprove’ for  
#ActionView::Base:0x105b3a780

Extracted source (around line #20):

17: = render\_index\_row\_index index  
18: - resources\_index\_row(rsrc).each do |row|  
19: = row  
20: = render\_index\_row\_actions(rsrc,  
resources\_index\_row\_actions(rsrc), options)  
21: - options[:with\_limit\_selector] = false  
22: = render\_index\_bottom\_pagination\_bar options

Is this a rails glitch, perhaps it is reading the method name wrong? Is  
there anyway to fix this?  
Thanks for any response.

---

<div class="post-metadata">

**Author:** ![jmaenpaa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9de053/32.png) [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Post date:** [March 19, 2010, 1:09am UTC](https://www.ruby-forum.com/t/undefined-method-error-despite-the-fact-it-doesnt-exist/185376/2 "2010-03-19T01:09:30Z")

</div>

Hi John,  
I would check your source code in app/views/resources/index.html.haml  
(or a view helper for that view) for a typo since it’s looking for a  
method named something similar to what you have (e.g change  
“render\_index\_row\_action\_pprove” to “render\_index\_row\_action\_approve”)

HTH

---

<div class="post-metadata">

**Author:** ![jmaenpaa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9de053/32.png) [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Post date:** [March 19, 2010, 9:24am UTC](https://www.ruby-forum.com/t/undefined-method-error-despite-the-fact-it-doesnt-exist/185376/3 "2010-03-19T09:24:04Z")

</div>

On 18 March 2010 23:43, John M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> NoMethodError in Student\_requests#index  
> 19: = row  
> 20: = render\_index\_row\_actions(rsrc,  
> resources\_index\_row\_actions(rsrc), options)  
> 21: - options[:with\_limit\_selector] = false  
> 22: = render\_index\_bottom\_pagination\_bar options

What does the trace show?

Colin

---

<div class="post-metadata">

**Author:** ![jmaenpaa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9de053/32.png) [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Post date:** [March 19, 2010, 3:43pm UTC](https://www.ruby-forum.com/t/undefined-method-error-despite-the-fact-it-doesnt-exist/185376/4 "2010-03-19T15:43:53Z")

</div>

Billee D. wrote:

> Hi John,  
> I would check your source code in app/views/resources/index.html.haml  
> (or a view helper for that view) for a typo since it’s looking for a  
> method named something similar to what you have (e.g change  
> “render\_index\_row\_action\_pprove” to “render\_index\_row\_action\_approve”)
> 
> HTH

I run the command find . -print | awk ‘{print “”"$0"""}’ | grep -v  
.svn | xargs grep -i “render\_index\_row\_action\_pprove”

and this is what I get:

trunk/log/development.log:ActionView::TemplateError (undefined method  
`render\_index\_row\_action\_pprove’ for #ActionView::Base:0x10c5ca938) on  
line #20 of app/views/resources/index.html.haml:

So the only place the method appears is in the development log. When  
someone else downloaded a local copy from the repository, they got no  
such error. So either a modification needs to be made in the development  
log or there’s nothing else it appears I can do. Thanks for the  
response.

---

<div class="post-metadata">

**Author:** ![jmaenpaa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9de053/32.png) [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Post date:** [March 19, 2010, 4:15pm UTC](https://www.ruby-forum.com/t/undefined-method-error-despite-the-fact-it-doesnt-exist/185376/5 "2010-03-19T16:15:02Z")

</div>

On 19 March 2010 14:43, John M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> someone else downloaded a local copy from the repository, they got no  
> such error. So either a modification needs to be made in the development  
> log or there’s nothing else it appears I can do. Thanks for the

Usually when I get an error shown in a haml file then somewhere (in  
log or server window maybe) there will be a full trace which may  
identify a line in a helper causing the problem. I wonder if it some  
unprintable character is causing the problem so your search does not  
find it.

I presume you have checked that you have no locally modified files.  
Also check that you have not got any extra files (backup files for  
example) in views/resources or helper folders. Rails has been known  
to pick up backup files instead of the correct file.

What happens if you check out a new local copy from the repository?

Colin

---

<div class="post-metadata">

**Author:** ![jmaenpaa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9de053/32.png) [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Post date:** [March 19, 2010, 3:53pm UTC](https://www.ruby-forum.com/t/undefined-method-error-despite-the-fact-it-doesnt-exist/185376/6 "2010-03-19T15:53:08Z")

</div>

John M. wrote:

> and this is what I get:
> 
> trunk/log/development.log:ActionView::TemplateError (undefined method  
> `render\_index\_row\_action\_pprove’ for #ActionView::Base:0x10c5ca938) on  
> line #20 of app/views/resources/index.html.haml:

So, what’s on line #20 of app/views/resources/index.html.haml ?
