vendredi 12 août 2016

simple_fields_for doesn't generate input when value for column is nil

I'm trying to load post with no comments, but this form is not shown:

<%= simple_form_for(@task) do |f| %>
  <%= f.simple_fields_for :comments  do |comment| %>
    <%= comment.input :COMM_TEXT, as: :text%>
  <% end %>
<% end %>

How to make it visible if no comments yet for post to add them.




Aucun commentaire:

Enregistrer un commentaire