Module: ErpWorkEffort::Extensions::ActiveRecord::ActsAsWorkEffort::InstanceMethods
- Defined in:
- lib/erp_work_effort/extensions/active_record/acts_as_work_effort.rb
Instance Method Summary collapse
Instance Method Details
#destroy_work_effort ⇒ Object
51 52 53 |
# File 'lib/erp_work_effort/extensions/active_record/acts_as_work_effort.rb', line 51 def destroy_work_effort self.work_effort.destroy end |
#new_work_effort ⇒ Object
55 56 57 58 59 60 61 |
# File 'lib/erp_work_effort/extensions/active_record/acts_as_work_effort.rb', line 55 def new_work_effort if self.new_record? and self.work_effort.nil? work_effort = WorkEffort.new self.work_effort = work_effort work_effort.work_effort_record = self end end |
#save_work_effort ⇒ Object
47 48 49 |
# File 'lib/erp_work_effort/extensions/active_record/acts_as_work_effort.rb', line 47 def save_work_effort self.work_effort.save end |