lk | adds ability to print multiple receipts for freecyclery clients

This commit is contained in:
Louis Knapp
2016-05-07 10:14:30 -05:00
parent bbc84247b4
commit 2ca3ae21a8
10 changed files with 147 additions and 35 deletions
+1
View File
@@ -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 -5
View File
@@ -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