-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to display hint for simple_fields_for
?
#1358
Comments
Thanks for the issue and sorry for the delay. Could you provide the code of the demo app? I'll take a look. |
I took this for a ride and have noticed the following behavior:
object_name is "account_setting"
object_name is "account[setting_attributes]" So, when
Whereas if it was just
|
I came across this issue today. I usually assign labels of fields directly and active record attributes, and leave hints and some specific label under Nesting the key for records end up not so nice when the association is polymorphic. So if the model is
The resulting hint locale would need to be
So
Not blocking, but just clarifying some scenarios make me use simple form a lot and are lost when nested attributes are involved. Maybe some fallback in hints and labels can be introduced that would use type information:
Although that would require an instance of the nested model in the association. |
Hi, I created demo app.
https://simple-form-hint.herokuapp.com
In my project. a nested model's hint does not show in form.
So, I reproduce that by simple app.
Access this link.
https://simple-form-hint.herokuapp.com/accounts/1/edit
So,
Account
model's attributes has hints. (which is likehint!
)but,
Account::Setting
model's attr not shown.this form was generated by
simple_fields_for
.locale file is ...
https://github.com/kntmrkm-public/simple_form_hint/blob/master/config/locales/simple_form.en.yml
I thought that locale file is wrong?
So, I created another model
Account::Post
.https://simple-form-hint.herokuapp.com/accounts/1
https://simple-form-hint.herokuapp.com/account/posts/1/edit
It works. hint was shown. locale file is good.
That means I do not know how to show hint for
simple_fields_for
.Sorry my English.
The text was updated successfully, but these errors were encountered: