Sha256: 37785c03544f4a7d00e54f49e24b269cfec2f1c511bb3f4bec4c18c11355307c
Contents?: true
Size: 1.59 KB
Versions: 1
Compression:
Stored size: 1.59 KB
Contents
module EitilCore class Railtie < Rails::Railtie initializer "my_railtie.configure_rails_initialization", options: :after do |app| # Dynamic dispatching after initialization of Rails classes. application_record = Rails.application.root.join("app/models/application_record.rb") if !Kernel.const_defined?("ApplicationRecord") && File.exists?(application_record) require application_record end # ApplicationRecord if Object.const_defined?('EitilCore::ApplicationRecord::WhereLike') ::ApplicationRecord.send(:extend, EitilCore::ApplicationRecord::WhereLike) end if Object.const_defined?('EitilCore::ApplicationRecord::FindByLike') ::ApplicationRecord.send(:extend, EitilCore::ApplicationRecord::FindByLike) end if Object.const_defined?('EitilCore::ApplicationRecord::DuckFind') ::ApplicationRecord.send(:extend, EitilCore::ApplicationRecord::DuckFind) end if Object.const_defined?('EitilCore::ApplicationRecord::AllAssociations') ::ApplicationRecord.send(:extend, EitilCore::ApplicationRecord::AllAssociations) end if Object.const_defined?('EitilCore::ApplicationRecord::ModelAtts') ::ApplicationRecord.send(:extend, EitilCore::ApplicationRecord::ModelAtts) end # ApplicationController if Object.const_defined?('EitilCore::ApplicationController::SliceParams') ::ActionController::API.send(:include, EitilCore::ApplicationController::SliceParams) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
eitil-2.0.8 | eitil_core/lib/eitil_core/railtie.rb |