Class: Adjective::IncludedModels

Inherits:
Object
  • Object
show all
Defined in:
lib/included_models.rb

Instance Method Summary collapse

Constructor Details

#initializeIncludedModels

Returns a new instance of IncludedModels.



3
4
5
# File 'lib/included_models.rb', line 3

def initialize
  @models = nil
end

Instance Method Details

#find_included_modelsObject



7
8
9
10
11
12
13
# File 'lib/included_models.rb', line 7

def find_included_models
  Dir[Rails.root.join('app', 'models', '**', '*.rb')].each do |file|
    require_dependency file
  end
  # model_path = Adjective.configuration.models_path
  ap ApplicationRecord.descendants
end