class method self.with

Ruby on Rails 3.2.22.5

Since v3.1.12 Last seen in v3.2.22.5

Available in: v3.1.12 v3.2.22.5

Signature

self.with(app)

No documentation comment.

Parameters

app req
Source
# File actionpack/lib/action_controller/railties/paths.rb, line 4
      def self.with(app)
        Module.new do
          define_method(:inherited) do |klass|
            super(klass)

            if namespace = klass.parents.detect { |m| m.respond_to?(:railtie_helpers_paths) }
              paths = namespace.railtie_helpers_paths
            else
              paths = app.helpers_paths
            end

            klass.helpers_path = paths

            if klass.superclass == ActionController::Base && ActionController::Base.include_all_helpers
              klass.helper :all
            end
          end
        end
      end

Defined in actionpack/lib/action_controller/railties/paths.rb line 4 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActionController::Railties::Paths

Type at least 2 characters to search.

↑↓ navigate · open · esc close