app/views/weeler/settings/index.html.haml in weeler-2.0.0 vs app/views/weeler/settings/index.html.haml in weeler-2.0.1
- old
+ new
@@ -7,13 +7,10 @@
Settings
.row
%div{class: "col-lg-8 col-md-8"}
- @settings.each do |item|
%div{style: "min-height: 50px;"}
- = form_for [:weeler, item], html: {class: "form-vertical", role: "form"} do |f|
- .form-group
- %label.col-lg-4.col-md-4.control-label
- = "#{item.var.humanize.capitalize}:"
- .col-lg-6.col-md-6
- = f.text_field :value, value: item.value, class: "form-control"
- .col-lg-2.col-md-2
- = f.submit "Save", class: "btn btn-primary"
+ = render 'form', item: item
+ - Setting.keys.each do |key|
+ - if !Setting.all.map(&:var).include?(key)
+ %div{style: "min-height: 50px;"}
+ = render 'form', item: Setting.new(var: key)
\ No newline at end of file