sgmap/boussole

View on GitHub
app/views/housings/steps/profile.html.haml

Summary

Maintainability
Test Coverage
-# coding: utf-8

.l-container-narrow
  .l-content
    %article.wizard-form
      %h1.wizard-form-header Ton profil
      %hr

      = simple_form_for(@housing, url: wizard_path, method: :put, wrapper: :vertical_form) do |f|
        = f.error_notification

        = f.input :current_status,
                  include_blank: false,
                  prompt: 'Sélectionne une option',
                  collection: STATUSES,
                  label_method: :to_s,
                  value_method: :to_s,
                  as: :select

        = f.input :next_status

        -# TODO: Get rid of dup/pushing
        = f.input :residence_city,
                  collection: CITIES[rhizome.()].dup.push('Sans domicile fixe'),
                  include_blank: false,
                  input_html: { rel: 'autocomplete' }

        = f.input :age,
                  include_blank: false,
                  prompt: 'Sélectionne une option',
                  collection: 16..30,
                  label_method: :to_i,
                  value_method: :to_i,
                  as: :select

        = render(partial: 'blocks/button_groups/wizard_last_step')