Class: Renalware::HD::SessionForms::Batch
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Renalware::HD::SessionForms::Batch
- Includes:
- Accountable
- Defined in:
- app/models/renalware/hd/session_forms/batch.rb
Instance Method Summary collapse
Methods included from Accountable
#first_or_create_by!, #save_by, #save_by!, #update_by
Instance Method Details
#percent_complete ⇒ Object
20 21 22 |
# File 'app/models/renalware/hd/session_forms/batch.rb', line 20 def percent_complete ((items.where(status: :compiled).count.to_f / batch_items_count) * 100).ceil end |