Louis Knapp
9 years ago
6 changed files with 20 additions and 16 deletions
@ -0,0 +1,12 @@ |
|||||
|
= form_for @bike, html: {class: 'form-horizontal'} do |f| |
||||
|
- 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 |
||||
|
|
||||
|
.row |
||||
|
.actions.col-sm-offset-2 |
||||
|
= f.submit value: "+ Log Another", class: "btn btn-default" |
@ -1,4 +1,4 @@ |
|||||
.container |
.container |
||||
%h1 New bike |
%h1 New bike |
||||
= render 'form' |
= render 'new_form' |
||||
= link_to 'Back', bikes_path |
= link_to 'Back', bikes_path |
||||
|
Loading…
Reference in new issue