Hey,
First of all, when you use new_xxx_path() you should use the singular-
form of xxx, which *should* be tranche in this case.
However, in the console it''s pretty easy to see that there is a
problem with the singularization of ''tranches'':
"tranche".pluralize.singularize #=> "tranch"
Which means that map.resources :tranches will force you to use
new_tranch_path etc.
You can fix this in your map.resources call:
map.resources :tranches, :singular => ''tranche''
Then you can do: new_tranche_path, edit_tranche_path, tranches_path.
HTH,
Trevor
On 28-Apr-07, at 3:35 PM, coolermaster wrote:
>
> When I run:
> script/generate scaffold_resource Tranche
>
> I get the following error:
> Showing app/views/tranches/index.rhtml where line #24 raised:
> undefined local variable or method `new_tranches_path'' for
#<#<Class:
> 0xb6985718>:0xb69856f0>
>
> I have a number of other resources that seem to work fine when
> generated the same way--it''s just Tranche that''s creating
problems. Is
> this some kind of reserved word? Or is there a pluralization issue?
>
> Any help would be appreciated!
>
>
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---