|
|
@ -16,22 +16,22 @@ CostEntry.class_eval do |
|
|
|
generator_for :tweek, 10 |
|
|
|
generator_for :tweek, 10 |
|
|
|
|
|
|
|
|
|
|
|
def self.next_project |
|
|
|
def self.next_project |
|
|
|
Project.last or Project.generate! |
|
|
|
Project.last || Project.generate! |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def self.next_cost_rate |
|
|
|
def self.next_cost_rate |
|
|
|
CostRate.last or CostRate.generate! |
|
|
|
CostRate.last || CostRate.generate! |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def self.next_user |
|
|
|
def self.next_user |
|
|
|
User.find_by_login("admin") |
|
|
|
User.generate_with_protected! |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def self.next_cost_type |
|
|
|
def self.next_cost_type |
|
|
|
CostType.last or CostType.generate! |
|
|
|
CostType.last || CostType.generate! |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def self.next_issue |
|
|
|
def self.next_issue |
|
|
|
self.next_project.issues.last or Issue.generate_for_project!(next_project) |
|
|
|
self.next_project.issues.last || Issue.generate_for_project!(next_project) |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|