# Restful scaffold for models containing "new" in the name

**URL:** <https://www.ruby-forum.com/t/restful-scaffold-for-models-containing-new-in-the-name/135498>\
**Category:** Rails\
**Created:** [April 22, 2008, 6:20pm UTC](https://www.ruby-forum.com/t/restful-scaffold-for-models-containing-new-in-the-name/135498 "2008-04-22T18:20:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![toverkamp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/b9bd4f/32.png) [@toverkamp](https://www.ruby-forum.com/u/toverkamp)\
**Post date:** [April 22, 2008, 6:20pm UTC](https://www.ruby-forum.com/t/restful-scaffold-for-models-containing-new-in-the-name/135498/1 "2008-04-22T18:20:28Z")

</div>

Hi,  
I’m quite new to rails especially to RESTful development so perhaps I’m  
got it completely wrong:

Rails 2.0.2 (gem update performed today from [rubyforge.org](http://rubyforge.org)) on Mac OS X  
10.5. I made use of a sqlite3 database.

I tried to generate a scaffold for a model named “customer”

script/generate scaffold customer name:string …  
rake db:migrate

Everything went fine as I could access index/update etc. via the  
browser.

After this I tried to do the same for a model named “Renew”.  
The generator went through fine, but if I want to check the scaffold via  
browser I receive a quite unfriendly:

–snip–  
NameError in Renews#index

Showing renews/index.html.erb where line #26 raised:

undefined local variable or method `new\_renew\_path’ for  
#ActionView::Base:0x25fd050  
Extracted source (around line #26):

23:  
24:   
  
25:  
26: \<%= link\_to ‘New renew’, new\_renew\_path %\>  
–snap–

The very same error occured if I name my model “Blanew”, so I guess I  
simply should avoid model names containing “new”.  
Am I wrong or is this a rails/generator bug?

Regards,  
Tobias.
