Browse Source

lk | adds youth as bike type & doesn't post to bike index

master
Louis Knapp 9 years ago
parent
commit
3ef59ca82e
  1. 2
      app/models/bike.rb
  2. 2
      app/views/bikes/_fields.html.haml

2
app/models/bike.rb

@ -5,7 +5,6 @@ class Bike < ActiveRecord::Base
validates :bike_type, presence: true
validates :color, presence: true
validates :serial_number, presence: true
after_save :post_to_bike_index
def name
self.brand + ' ' + self.model
@ -37,5 +36,4 @@ class Bike < ActiveRecord::Base
return true if self.bike_index_id.present?
BikeIndexLogger.perform_async(self.id)
end
end

2
app/views/bikes/_fields.html.haml

@ -23,7 +23,7 @@
.form-group
= f.label "Type:", class: "col-sm-4 control-label"
.col-sm-6
= f.select :bike_type, [["BMX", "BMX"], ["Cruiser", "Cruiser"], ["Hybrid", "Hybrid"], ["Mountain", "Mountain"], ["Road", "Road"], ["Touring", "Touring"], ["Track", "Track"], ["Utility", "Utility"]], {}, class: "selectpicker", disabled: disabled
= f.select :bike_type, [["BMX", "BMX"], ["Cruiser", "Cruiser"], ["Hybrid", "Hybrid"], ["Mountain", "Mountain"], ["Road", "Road"], ["Touring", "Touring"], ["Track", "Track"], ["Utility", "Utility"], ["Youth", "Youth"]], {}, class: "selectpicker", disabled: disabled
.form-group
= f.label "Color:", class: "col-sm-4 control-label"

Loading…
Cancel
Save