From 17278fac989bdaf68b1b55053a604af223f05e2b Mon Sep 17 00:00:00 2001 From: Paul van Tilburg Date: Sat, 13 Jul 2013 22:31:41 +0200 Subject: [PATCH] Add specification related attributes to the Customer and Invoice model --- stoptime.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/stoptime.rb b/stoptime.rb index 407cdcb..c10847c 100644 --- a/stoptime.rb +++ b/stoptime.rb @@ -193,6 +193,7 @@ module StopTime::Models # [email] email address (String) # [phone] phone number (String) # [hourly_rate] default hourly rate (Float) + # [time_specification] whether the customer requires time specifications (TrueClass/FalseClass) # [created_at] time of creation (Time) # [updated_at] time of last update (Time) # @@ -358,6 +359,8 @@ module StopTime::Models # [id] unique identification number (Fixnum) # [number] invoice number (Fixnum) # [paid] flag whether the invoice has been paid (TrueClass/FalseClass) + # [include_specification] flag whether the invoice should include a time + # specification (TrueClass/FalseClass) # [created_at] time of creation (Time) # [updated_at] time of last update (Time) # @@ -694,6 +697,18 @@ module StopTime::Models end end + class TimeSpecificationSupport < V 1.95 # :nodoc: + def self.up + add_column(Customer.table_name, :time_specification, :boolean) + add_column(Invoice.table_name, :include_specification, :boolean) + end + + def self.down + remove_column(Customer.table_name, :time_specification) + remove_column(Invoice.table_name, :include_specification) + end + end + end # StopTime::Models # = The Stop… Camping Time! controllers