In my Rails 3.2.6 application, I have a model representing a widget dataset. In my opinion, the correct name for this class is WidgetData
, the plural, because I have more than one data item for each widget.
If I ask Rails to create a form for this class:
= form_for @widget_data do |f| ...
I get the error ActionView::Template::Error (undefined method 'widget_datum_path' ...
Presumably this is due to the data / data bending rule.
I'm not sure how best to resolve this: I can let Rails dictate that my model should be WidgetDatum
. Or I could somehow disable the use of the inflection rule in this particular case, but I'm not sure how best to do it. Tip welcome.
To anticipate one possible answer: the reason the model is not just called Widget
is because I already have a facade class with a name that represents a richer view of the widget that includes both WidgetData
and other information as well.
source share