Topic says it all guys, my program needs to be able to keep track of the "software" that belongs to a user, as such I have a MVC for "Software". However, I can't use RESTful routes at the moment since my plural and singular names are the same, it's "software" for both. Can anybody help me either, create new named routes or suggest a new name for my MVC that still implies "software" but has different singular/plural?
A:
Why don't you call it SoftwareItem so you can have SoftwareItems...?
Ganesh Shankar
2010-02-17 04:02:27
A:
If you really need to have your model named Software, you should do what is needed for uncountable-noun-named models:
map.resources :software, :singular => "software_item"
That way you'll have helpers like
new_software_item_url
software_item_url(software)
etc. Otherwise it's hard for Rails to tell whether you're using "software" as singular or plural :)
neutrino
2010-02-17 07:37:11
but just renaming your model will save you a lot of headache if it's not that big a deal to you... Then you can just sit back and let Rails automagic things for you.
Ganesh Shankar
2010-02-17 07:44:28