Closed derekprior closed 2 years ago
adding inflect.uncountable 'credentials'
to my inflections also fixes this and is likely a fine solution for this (even though its a lie). If you don't have a good idea for fixing this without the inflector, then feel free to close.
I have an ActiveModel class named
Credentials
with encapsulates an email and password form. I define the following translations:However, when I call
fill_form(:credentials, { email: 'foo@bar.com', password: 'password' }
, I get anInputNotFound
error. Formulaic first tries to use simple form translations to find the input. Failing that, it tries to get at human attribute name byclassify
ing the model name passed tofill_form
. Unfortunately,classify
uses the inflector to singularize the input.I don't know if there's a great solution to this. I can't think of a scenario where the singularization would be useful for formulaic, but I also think reimplementing classify might be more trouble than its worth here as well.
For now, I can work around this by duplicating the translations as simple_form label translations, but this is also not an ideal solution.