views:

314

answers:

2

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