Sha256: 56b5e719522f42b0865fadb98edb13f7ef780794a56e21a81d0598e7e2a38bd6

Contents?: true

Size: 882 Bytes

Versions: 23

Compression:

Stored size: 882 Bytes

Contents

module Plutonium
  module Pkg
    module Base
      extend ActiveSupport::Concern

      included do
        # prevent this package from being added to the view lookup
        # since we need finer control over how views are resolved.
        # view lookup configuration is handled at the controller level
        config.before_configuration do
          # this touches the internals of rails, but I could not find a good way of doing this
          # we get the initializer instance and set the block property to a noop
          # There is no error handling, to ensure we know when it breaks.
          add_view_paths_initializer = Rails.application.initializers.find do |a|
            a.context_class == self && a.name.to_s == "add_view_paths"
          end
          add_view_paths_initializer.instance_variable_set(:@block, ->(app) {})
        end
      end
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
plutonium-0.14.1 lib/plutonium/pkg/base.rb
plutonium-0.14.0 lib/plutonium/pkg/base.rb
plutonium-0.13.3 lib/plutonium/pkg/base.rb
plutonium-0.13.2 lib/plutonium/pkg/base.rb
plutonium-0.13.1 lib/plutonium/pkg/base.rb
plutonium-0.13.0 lib/plutonium/pkg/base.rb
plutonium-0.12.14 lib/plutonium/pkg/base.rb
plutonium-0.12.13 lib/plutonium/pkg/base.rb
plutonium-0.12.12 lib/plutonium/pkg/base.rb
plutonium-0.12.11 lib/plutonium/pkg/base.rb
plutonium-0.12.10 lib/plutonium/pkg/base.rb
plutonium-0.12.9 lib/plutonium/pkg/base.rb
plutonium-0.12.8 lib/plutonium/pkg/base.rb
plutonium-0.12.7 lib/plutonium/pkg/base.rb
plutonium-0.12.5 lib/plutonium/pkg/base.rb
plutonium-0.12.4 lib/plutonium/pkg/base.rb
plutonium-0.12.3 lib/plutonium/pkg/base.rb
plutonium-0.12.2 lib/plutonium/pkg/base.rb
plutonium-0.12.1 lib/plutonium/pkg/base.rb
plutonium-0.12.0 lib/plutonium/pkg/base.rb