Class: IntegrationReference
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- IntegrationReference
- Defined in:
- app/models/integration_reference.rb
Defined Under Namespace
Modules: ReferenceTypes
Class Method Summary collapse
Methods inherited from ApplicationRecord
define_decrypted_attribute, define_decrypted_attributes, #errors_in_bullet_points, primary_connection, special_connection
Class Method Details
.for_agendrix(company_id:) ⇒ Object
16 17 18 |
# File 'app/models/integration_reference.rb', line 16 def for_agendrix(company_id:) where(integration_id: Integration.agendrix.id) end |
.for_timesheets(company_id: nil) ⇒ Object
20 21 22 23 |
# File 'app/models/integration_reference.rb', line 20 def for_timesheets(company_id: nil) where(reference_type: ReferenceTypes::EMPLOYEE_TIME_SHEET) .where(company_id.present? ? { company_id: company_id } : {}) end |