git-svn-id: https://dev.finn.de/svn/cockpit/branches/reporting_merge@1527 7926756e-e54e-46e6-9721-ed318f58905epull/6827/head
parent
5aa1865a30
commit
1a1fea910b
@ -1,12 +1,12 @@ |
||||
CostRate.class_eval do |
||||
Rate.class_eval do |
||||
generator_for :valid_from, :method => :next_valid_from |
||||
generator_for :rate, 10 |
||||
generator_for :cost_type, :method => :next_cost_type |
||||
|
||||
|
||||
def self.next_cost_type |
||||
CostType.last or CostType.generate! |
||||
CostType.last || CostType.generate! |
||||
end |
||||
|
||||
|
||||
def self.next_valid_from |
||||
1.year.ago + Rate.count |
||||
end |
||||
|
Loading…
Reference in new issue