Sha256: 6447d7ab8c04b8ae24d76c9a8afb34bc824ae80b3253340502a107e7c8e97754
Contents?: true
Size: 637 Bytes
Versions: 15
Compression:
Stored size: 637 Bytes
Contents
require_relative './env_checker' module WashoutBuilder # the engine that is used to mount inside the rails application class Engine < ::Rails::Engine isolate_namespace WashoutBuilder config.washout_builder = ActiveSupport::OrderedOptions.new initializer 'washout_builder.configuration' do |app| mounted_path = app.config.washout_builder[:mounted_path] if WashoutBuilder::EnvChecker.new(app).available_for_env?(Rails.env) app.routes.append do mount WashoutBuilder::Engine => mounted_path if mounted_path.is_a?(String) && mounted_path.starts_with?('/') end end end end end
Version data entries
15 entries across 15 versions & 1 rubygems