mirror of
https://github.com/fspc/bike-database.git
synced 2026-09-16 08:31:39 -04:00
lk | adds ability to print multiple receipts for freecyclery clients
This commit is contained in:
@@ -5,6 +5,7 @@ class Bike < ActiveRecord::Base
|
||||
validates :bike_type, presence: true
|
||||
validates :color, presence: true
|
||||
validates :serial_number, presence: true
|
||||
has_one :client
|
||||
|
||||
def self.bike_types
|
||||
[
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
class Client < ActiveRecord::Base
|
||||
# TODO: figure out why application_date validation is fubar
|
||||
# validates :application_date, presence: true
|
||||
has_one :bike
|
||||
belongs_to :bike
|
||||
belongs_to :agency
|
||||
|
||||
def self.waiting_list
|
||||
@@ -20,8 +20,4 @@ class Client < ActiveRecord::Base
|
||||
Client.all.select{|client| client.application_voided || client.pickup_date}
|
||||
end
|
||||
|
||||
def bike
|
||||
Bike.find(self.bike_id)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user