Louis | Remove failing autogenerated tests, fix bug where bike type wasn't saving

This commit is contained in:
Loos
2014-09-17 09:12:16 -04:00
parent d3403e18cd
commit 4d49cf829f
18 changed files with 47 additions and 137 deletions
+1 -1
View File
@@ -54,7 +54,7 @@ class BikesController < ApplicationController
:entry_date,
:brand,
:model,
:type,
:bike_type,
:color,
:frame_size,
:log_number,
+2 -1
View File
@@ -60,6 +60,7 @@ class ClientsController < ApplicationController
:helmet,
:lock,
:agency,
:completion_date)
:completion_date,
:bike_id)
end
end
-1
View File
@@ -4,6 +4,5 @@ class Bike < ActiveRecord::Base
validates :model, presence: true
validates :bike_type, presence: true
validates :color, presence: true
validates :frame_size, presence: true
validates :serial_number, presence: true
end
+1
View File
@@ -1,2 +1,3 @@
class Client < ActiveRecord::Base
has_one :bike
end
+8
View File
@@ -43,7 +43,15 @@
= f.label "Agency", class: "col-sm-2 control-label"
.col-sm-10
= f.text_field :agency, class: "form-control", disabled: disabled
.form-group
= f.label "Completion Date:", class: "col-sm-2 control-label"
.col-sm-10
= f.text_field :completion_date, class: "form-control datepicker", disabled: disabled
.form-group
= f.label "Type:", class: "col-sm-2 control-label"
.col-sm-10
= f.select(:bike_id, Bike.all.collect {|b| [ b.model, b.id ] }, {include_blank: 'None'})