mirror of
https://github.com/fspc/bike-database.git
synced 2026-09-16 08:31:39 -04:00
Louis | Remove failing autogenerated tests, fix bug where bike type wasn't saving
This commit is contained in:
@@ -54,7 +54,7 @@ class BikesController < ApplicationController
|
||||
:entry_date,
|
||||
:brand,
|
||||
:model,
|
||||
:type,
|
||||
:bike_type,
|
||||
:color,
|
||||
:frame_size,
|
||||
:log_number,
|
||||
|
||||
@@ -60,6 +60,7 @@ class ClientsController < ApplicationController
|
||||
:helmet,
|
||||
:lock,
|
||||
:agency,
|
||||
:completion_date)
|
||||
:completion_date,
|
||||
:bike_id)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -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,2 +1,3 @@
|
||||
class Client < ActiveRecord::Base
|
||||
has_one :bike
|
||||
end
|
||||
|
||||
@@ -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'})
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user