Class: WorkAccount
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- WorkAccount
- Defined in:
- app/models/work_account.rb
Instance Method Summary collapse
Instance Method Details
#enable_invoicing? ⇒ Boolean
10 11 12 |
# File 'app/models/work_account.rb', line 10 def enable_invoicing? invoice_code && invoice_code.length > 0 end |
#total_hours ⇒ Object
14 15 16 |
# File 'app/models/work_account.rb', line 14 def total_hours works.inject(BigDecimal('0')) {|total, work| total + work.hours} end |