app/views/settings/_edit_settings.html.erb

Summary

Maintainability
Test Coverage
<section class="user-settings wrapper">

  <header><h1><%= t 'settings.title' %></h1></header>

  <%= remote_form_for @settings, url: settings_path, method: 'patch' do |f| %>

    <p>
      <%= f.label :password, t('settings.password.label') %>
      <%= link_to_modal t('settings.password.button'), forgot_password_users_path,
            :remote => true, html: {class: 'password-reset button'} %>
    </p>

    <p>
      <%= f.label :language, t('settings.language') %>
      <%= f.select :language, language_options %>
    </p>

    <p>
      <%= f.label :mail_notifications, t('settings.mail_notifications.label') %>
      <span class="mail_notifications_choice">
        <%= f.radio_button:mail_notifications, "daily" %>
        <%= f.label :mail_notifications_daily, t('settings.mail_notifications.daily') %>
      </span>
      <span class="mail_notifications_choice">
        <%= f.radio_button :mail_notifications, "weekly" %>
        <%= f.label :mail_notifications_weekly, t('settings.mail_notifications.weekly') %>
      </span>
      <span class="mail_notifications_choice">
        <%= f.radio_button :mail_notifications, "never" %>
        <%= f.label :mail_notifications_never, t('settings.mail_notifications.never') %>
      </span>
    </p>

    <p>
      <%= f.label :auth_token, t('settings.api_token') %>
      <span class="auth_token inline"><%= @settings.auth_token%></span>
    </p>

    <p>
      <%= f.submit t('settings.submit') %>
    </p>
  <% end %>

</section>