11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
# File 'lib/erp_work_effort/extensions/active_record/acts_as_work_effort.rb', line 11
def acts_as_work_effort
extend ActsAsWorkEffort::SingletonMethods
include ActsAsWorkEffort::InstanceMethods
after_initialize :new_work_effort
after_update :save_work_effort
after_save :save_work_effort
after_destroy :destroy_work_effort
has_one :work_effort, :as => :work_effort_record
[ :description,
:description=,
:facility,
:facility=,
:work_effort_party_assignments,
:work_effort_inventory_assignments,
:work_effort_fixed_asset_assignments,
:projected_cost,
:projected_cost=,
:projected_completion_time,
:projected_completion_time=,
:actual_cost,
:start,
:started?,
:completed?
].each do |m|
delegate m, :to => :work_effort
end
end
|