bootstrap_form
bootstrap_form copied to clipboard
inline validation for fields_for
trafficstars
Hello! In this code, title and content fields show inline errors properly but staple_food and main_dish doesn't. Is there a mistake?
<%= bootstrap_form_with(model: @recipe_form, url: @recipe_form.persisted? ? recipe_path : recipes_path) do |form| %>
<%= form.text_field :title %>
<%= form.text_area :content %>
<%= form.fields_for :genres do |g| %>
<%= g.text_field :staple_food %>
<%= g.text_field :main_dish %>
<% end %>
<%= form.submit %>