I have a very simple action text model and form
class Course < ApplicationRecord
validates :title, presence: true
has_rich_text :content
end
<%= form_with model: @course do |f| %>
<%= f.text_field :title %>
<%= f.rich_text_area :content %>
<% end %>
It's all working great but since the content
field is optional is it possible to create a course
model without creating action_text_rich_texts
entries that are empty/blank? Even if the user only enters the title
without any content
it's currently creating them and there's a lot of unnecessary and empty action_text_rich_texts
rows in the database