Skip to content

How to display hint for simple_fields_for ? #1358

Open
@kntmrkm

Description

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 like hint!)
but, Account::Setting model's attr not shown.

this form was generated by simple_fields_for.

<%= simple_form_for(@account) do |f| %>
  <%= f.error_notification %>

  <div class="form-inputs">
    <%= f.input :name %>
    <%= f.input :active %>
  </div>

  <%= f.simple_fields_for :setting do |f| %>
    <div class="form-inputs">
      <%= f.input :enabled %>
      <%= f.input :memo %>
    </div>
  <% end %>

  <div class="form-actions">
    <%= f.button :submit %>
  </div>
<% end %>

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions