module Trailblazer::Railtie::Loader
Constants
- AllModelFiles
Load all model files before any TRB files.
- ModelFile
Prepend model file, before the concept files like operation.rb get loaded.
Public Class Methods
engines()
click to toggle source
# File lib/trailblazer/rails/railtie/loader.rb, line 15 def self.engines ::Rails.application.railties.select { |tie| tie.is_a?(::Rails::Engine) } end
load_concepts(app)
click to toggle source
# File lib/trailblazer/rails/railtie/loader.rb, line 9 def self.load_concepts(app) load_for(app) engines.each { |engine| load_for(engine) } end
load_for(app)
click to toggle source
# File lib/trailblazer/rails/railtie/loader.rb, line 19 def self.load_for(app) Trailblazer::Loader.new.(prepend: AllModelFiles, root: app.root) { |file| require_dependency(file) } end