<%= form_with(model: post) do |form| %> <div class="mb-3"> <%= form.label :title, class: 'form-label' %> <%= form.text_field :title, class: 'form-control' %> </div> <div class="mb-3"> <%= form.label :poster, class: 'form-label' %> <%= form.file_field :poster, class: 'form-control' %> </div> <div class="mb-3"> <%= form.label :content, class: 'form-label' %> <%= form.rich_text_area :content, class: 'form-control' %> </div> <div class="actions"> <%= form.submit class: 'btn btn-primary' %> </div> <% end %>