Sha256: cac176a5585f11f489c20333274030c3df55d1a36b09cb79aebd0243620dd523

Contents?: true

Size: 765 Bytes

Versions: 20

Compression:

Stored size: 765 Bytes

Contents

module MnoEnterprise
  module Frontend
    class Engine < ::Rails::Engine
      isolate_namespace MnoEnterprise

      # Add assets
      config.assets.precompile += %w( mno_enterprise/application_lib.js )

      # To be able to load lib/mno_enterprise/concerns/...
      config.autoload_paths += Dir["#{config.root}/lib/**/"]

      # I18n management
      # Internally rewrite /en/dashboard/#/apps to /dashboard/#/apps
      initializer "mnoe.middleware" do |app|
        if MnoEnterprise.i18n_enabled && (Rails.env.development? || Rails.env.test?)
          require 'rack-rewrite'

          app.middleware.insert_before(0, Rack::Rewrite) do
            rewrite %r{/[a-z]{2}/dashboard/(.*)}, '/dashboard/$1'
          end
        end
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
mno-enterprise-frontend-3.4.0 lib/mno_enterprise/frontend/engine.rb
mno-enterprise-frontend-3.3.3 lib/mno_enterprise/frontend/engine.rb
mno-enterprise-frontend-3.3.2 lib/mno_enterprise/frontend/engine.rb
mno-enterprise-frontend-3.2.1 lib/mno_enterprise/frontend/engine.rb
mno-enterprise-frontend-3.3.1 lib/mno_enterprise/frontend/engine.rb
mno-enterprise-frontend-3.3.0 lib/mno_enterprise/frontend/engine.rb
mno-enterprise-frontend-3.2.0 lib/mno_enterprise/frontend/engine.rb
mno-enterprise-frontend-3.1.4 lib/mno_enterprise/frontend/engine.rb
mno-enterprise-frontend-3.0.7 lib/mno_enterprise/frontend/engine.rb
mno-enterprise-frontend-3.1.3 lib/mno_enterprise/frontend/engine.rb
mno-enterprise-frontend-3.0.6 lib/mno_enterprise/frontend/engine.rb
mno-enterprise-frontend-3.1.2 lib/mno_enterprise/frontend/engine.rb
mno-enterprise-frontend-3.0.5 lib/mno_enterprise/frontend/engine.rb
mno-enterprise-frontend-3.1.1 lib/mno_enterprise/frontend/engine.rb
mno-enterprise-frontend-3.0.4 lib/mno_enterprise/frontend/engine.rb
mno-enterprise-frontend-3.1.0 lib/mno_enterprise/frontend/engine.rb
mno-enterprise-frontend-3.0.3 lib/mno_enterprise/frontend/engine.rb
mno-enterprise-frontend-3.0.2 lib/mno_enterprise/frontend/engine.rb
mno-enterprise-frontend-3.0.1 lib/mno_enterprise/frontend/engine.rb
mno-enterprise-frontend-3.0.0 lib/mno_enterprise/frontend/engine.rb