Sha256: 068fdc4c6513e9f9e60be10453f5f2b08bff984fa3bbe73e46070975625f3f63

Contents?: true

Size: 592 Bytes

Versions: 7

Compression:

Stored size: 592 Bytes

Contents

# frozen_string_literal: true

require 'eac_ruby_utils/core_ext'

module EacRailsUtils
  module EngineHelper
    common_concern do
      append_autoload_paths
      append_self_migrations
    end

    module ClassMethods
      def append_autoload_paths
        config.autoload_paths += Dir["#{config.root}/lib/**/"]
      end

      def append_self_migrations
        initializer :append_migrations do |app|
          config.paths['db/migrate'].expanded.each do |expanded_path|
            app.config.paths['db/migrate'] << expanded_path
          end
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
eac_rails_utils-0.21.0 lib/eac_rails_utils/engine_helper.rb
eac_rails_utils-0.20.0 lib/eac_rails_utils/engine_helper.rb
eac_rails_utils-0.19.0 lib/eac_rails_utils/engine_helper.rb
eac_rails_utils-0.18.0 lib/eac_rails_utils/engine_helper.rb
eac_rails_utils-0.17.2 lib/eac_rails_utils/engine_helper.rb
eac_rails_utils-0.17.1 lib/eac_rails_utils/engine_helper.rb
eac_rails_utils-0.17.0 lib/eac_rails_utils/engine_helper.rb