undefined method error despite the fact it doesn't exist

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.

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

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

What does the trace show?

Colin

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.

John Merlino 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 ?

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