libertarian-party/partynest

View on GitHub
app/views/staffs/people/new.html.erb

Summary

Maintainability
Test Coverage
<div class="container">
  <%= nav_breadcrumb(
    [translate(:staff_services), staff_root_path],
    [Person.model_name.human(count: 0), staff_people_path],
    translate(:create),
  ) %>

  <%= simple_form_for [:staff, @person] do |f| %>
    <%= f.error_notification %>

    <%= f.input :last_name %>
    <%= f.input :first_name %>
    <%= f.input :middle_name %>
    <%= f.input :sex, collection: Person.sexes.keys.map(&:to_sym) %>
    <%= f.input :date_of_birth, start_year: 1900, end_year: Time.zone.now.year %>
    <%= f.input :place_of_birth %>
    <%= f.input :photo, direct_upload: true %>

    <%= f.button :submit %>
  <% end %>
</div>