Module: Integrative::Extensions::RelationExtension
- Defined in:
- lib/integrative/extensions/relation_extension.rb
Instance Method Summary collapse
Instance Method Details
#integrate(*name_or_names, **options) ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/integrative/extensions/relation_extension.rb', line 4 def integrate(*name_or_names, **) names = [*name_or_names] names.each do |name| integrate_per_name(name, ) end self end |
#load ⇒ Object
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/integrative/extensions/relation_extension.rb', line 12 def load super if @integrations_used.present? Rails.logger.info "Integrations fetched for #{@records.length} #{klass.name} records." @integrations_used.each do |integration| integration.integrated_class.integrative_find_and_assign(@records, integration) end end self end |