app/views/env_vars/_form.html.erb
<div class="box">
<h3 class="title">Add new env var</h3>
<%= form_for [@app.server, @app, @env_var], remote: true do |f| %>
<%= f.label :key, class: "label" %>
<div class="control">
<%= f.text_field :key, placeholder: "Key", class: "input",
data: { error: @env_var.errors[:key].first } %>
</div>
<%= f.label :value, class: "label" %>
<div class="control">
<%= f.text_field :value, placeholder: "Value", class: "input" %>
</div>
<div class="control">
<label class="checkbox">
<%= f.check_box :apply_immediately, checked: false %>
Immediately apply & restart app
</label>
</div>
<%= f.submit "Add", class: "button is-primary" %>
<% end %>
</div>