lk | user can log multiple bikes in a row

This commit is contained in:
Louis Knapp
2015-09-19 17:47:45 -05:00
parent db0945ce81
commit f2badbd484
5 changed files with 26 additions and 21 deletions
+4 -4
View File
@@ -1,12 +1,12 @@
= form_for @bike, html: {class: 'form-horizontal'} do |f|
- if @bike.errors.any?
- if @bike.errors.any?
#error_explanation
%h2= pluralize(@bike.errors.count, "error") + " prohibited this bike from being saved:"
%ul
- @bike.errors.full_messages.each do |msg|
%li= msg
= render 'fields', f: f
%li= msg
= render 'fields', f: f
.row
.actions.col-sm-offset-2
= f.submit class: "btn btn-default"
= f.submit value: "Log another bike", class: "btn btn-default"