BathHacked/energy-sparks

View on GitHub
app/views/admin/weather_stations/_form.html.erb

Summary

Maintainability
Test Coverage
<%= simple_form_for([:admin, weather_station]) do |f| %>
  <%= f.input :title, as: :string %>
  <%= f.input :description, as: :string %>
  <%= f.input :latitude %>
  <%= f.input :longitude %>
  <%= f.input :back_fill_years %>
  <%= f.input :provider, collection: [["Meteostat", "meteostat"]], selected: "meteostat" %>
  <%= f.input :active, label: "Load data?", as: :boolean %>
  <%= f.submit class: 'btn btn-primary', data: {confirm: 'Modifying latitude or longitude will reset data for this station - are you sure?'} %>
<% end %>