Class: Adjective::IncludedModels
- Inherits:
-
Object
- Object
- Adjective::IncludedModels
- Defined in:
- lib/included_models.rb
Instance Method Summary collapse
- #find_included_models ⇒ Object
-
#initialize ⇒ IncludedModels
constructor
A new instance of IncludedModels.
Constructor Details
#initialize ⇒ IncludedModels
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_models ⇒ Object
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 |