Method: Tidewave::Tools::GetModels#call
- Defined in:
- lib/tidewave/tools/get_models.rb
#call ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/tidewave/tools/get_models.rb', line 9 def call # Ensure all models are loaded Rails.application.eager_load! models = ActiveRecord::Base.descendants.map do |model| { name: model.name, relationships: get_relationships(model) } end models.to_json end |