Friday, September 20, 2024 1:41:45 AM
> settings

Customize


Authenticate

> edit.html.erb
<%= update_turbo_modal do %>
  <%= form_with model: post, url: post_path(post.public_id), method: :put do |f| %>
    <div class="modal-header">
      <h5 class="modal-title">Editing post</h5>
      <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
    </div>

    <div class="modal-body">
      <div class="mb-3">
        <div class="col-12">
          <%= f.label :status, class: "form-label" %>
          <%= f.select :status, options_for_select(*statuses), {}, class: "form-control" %>
        </div>
      </div>

      <div class="mb-3">
        <div class="col-12">
          <%= f.label :role_visibility, "Visible to", class: "form-label" %>
          <%= f.select :role_visibility, [], {}, multiple: "", data: {roles:, controller: "role-selector"} %>
        </div>
      </div>
    </div>

    <div class="modal-footer">
      <button type="button" class="btn btn-outline-secondary" data-bs-dismiss="modal">Close</button>
      <%= f.button "Save and exit", type: "submit", class: "btn btn-outline-primary" %>
    </div>
  <% end %>
<% end %>
All opinions represented herein are my own
- © 2024 itsthedevman
- build 340fbb8