Restful scaffold for models containing "new" in the name

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) 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.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs