Class: Rails::Schema::Extractor::AssociationReader

Inherits:
Object
  • Object
show all
Defined in:
lib/rails/schema/extractor/association_reader.rb

Instance Method Summary collapse

Instance Method Details

#read(model) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/rails/schema/extractor/association_reader.rb', line 7

def read(model)
  model.reflect_on_all_associations.filter_map do |ref|
    next if skip_association?(ref)

    build_association_data(model, ref)
  end
end