Sha256: 26d7a50deaedaf7a1e4febbedae4bc720e5567e275a8ecf19390745c332ca6d7

Contents?: true

Size: 627 Bytes

Versions: 2

Compression:

Stored size: 627 Bytes

Contents

<%= wrap_in_modules_with_new_lines <<-rb.strip_heredoc
  class Engine < ::Rails::Engine
  #{'  isolate_namespace ' + camelized_modules}
    paths["app/views"] << "app/views/#{namespaced_name}"

    initializer :append_migrations do |app|
      unless app.root.to_s.match(root.to_s)
        config.paths["db/migrate"].expanded.each do |p|
          app.config.paths["db/migrate"] << p
        end
      end
    end

    config.to_prepare do
      Dir.glob(Engine.root.join("app", "decorators", "**", "*_decorator*.rb")) do |c|
        Rails.configuration.cache_classes ? require(c) : load(c)
      end
    end
  
  end
rb
%>



Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
modular_engine-0.9.5 lib/generators/modular/templates/lib/%namespaced_name%/engine.rb
modular_engine-0.9.4 lib/generators/modular/templates/lib/%namespaced_name%/engine.rb