mirror of
https://github.com/fspc/bike-database.git
synced 2026-09-16 08:31:39 -04:00
Louis | mild refactorings, add name method to bike
This commit is contained in:
@@ -5,4 +5,8 @@ class Bike < ActiveRecord::Base
|
||||
validates :bike_type, presence: true
|
||||
validates :color, presence: true
|
||||
validates :serial_number, presence: true
|
||||
|
||||
def name
|
||||
[self.seat_tube_size.to_s, self.brand, self.model] * ' '
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user