I waste tons of time trying to construct the the proper yaml for translating text and labels in Rails.
Is there an easy way to pinpoint what path I should use in the YAML to provide the translation?
As an example, I am using a nested simple_form with this form erb:
<%= f.input :birth_date, as:'string' %>
The label I get is Birth date
and I am assuming is just coming from the model attribute.
When I debug that line and type f.object_name
I get
=> "user_wizard[children_attributes]
Here's my YAML
en-US:
simple_form:
labels:
user_wizard:
children_attributes:
birth_date: "Name Date or Expected Date"
Is there a sure-fire way to log, print, probe, watch, render or query that will give the (or one) exact path I need in almost any situation? Not just simple_form or a model attribute but for error messages, buttons, mailers, etc.