In my Rails 3.2.6 app, I have a model representing a collection of data about a widget. To my mind, the correct name for this class is WidgetData
, plural, because I have more than one item of data per widget.
If I ask Rails to generate a form for this class:
= form_for @widget_data do |f|
...
I get an error ActionView::Template::Error (undefined method 'widget_datum_path' ...
. Presumably this is because of the Rails data/datum inflection rule.
I'm unsure how best to resolve this: I could let Rails dictate that my model should in fact be WidgetDatum
. Or I could somehow disable the use of the inflection rule in this particular case, but I'm unsure how best to do that.
To anticipate one possible answer: the reason that the model is not just called Widget
is that I have a façade class named that already, which presents a richer view of a widget incorporating both the WidgetData
and other information as well.