Topic: Pluralization and Ambiguous Routes on Forms
I'm building a CMS with a model called Content. Since the plural of content is also content I set the following in environment.rb: inflect.uncountable('content'). My question is if anyone knows if it is possible to use the simply_helpful (and Rails 2.0) form start code in both edit and new forms:
<% form_for @content do |f| %>
When I use that I get an error about ambiguous routes in my new content form. The reason seems to be because of the pluralization of the word content. I can get around the error by using two different forms and hard coding the url for new content entries to '/content'. The problem with this is that I have to essentially duplicate the forms (except for the start of the form tags). Since my users will be creating and updating new content forms this will result in twice as much work for them.
Does anyone have any suggestions? Is there perhaps a clever way to have different form start code in the ERB file itself based on whether or not it is creating a new record or upating an existing one?
Any help would be greatly appreciated.