Class: ModelExplorer::Associations::Many

Inherits:
Base
  • Object
show all
Defined in:
lib/model_explorer/associations/many.rb

Instance Attribute Summary

Attributes inherited from Base

#association, #record, #reflection

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from ModelExplorer::Associations::Base

Instance Method Details

#exportObject



4
5
6
7
8
9
10
11
12
# File 'lib/model_explorer/associations/many.rb', line 4

def export
  {
    name: name,
    type: macro,
    scopes: scopes,
    count: records.count,
    records: export_records
  }
end

#recordsObject



14
15
16
17
18
# File 'lib/model_explorer/associations/many.rb', line 14

def records
  ensure_valid_scopes!

  super
end