Tobias Overkamp
2008-Apr-22 16:20 UTC
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: <br /> 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. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---