Sha256: 4080f5c22e92310769535173deb403ac72050216ecad68da2e065b8b7afaf055

Contents?: true

Size: 595 Bytes

Versions: 90

Compression:

Stored size: 595 Bytes

Contents

# frozen_string_literal: true

module AbstractController
  module Railties
    module RoutesHelpers
      def self.with(routes, include_path_helpers = true)
        Module.new do
          define_method(:inherited) do |klass|
            super(klass)
            if namespace = klass.parents.detect { |m| m.respond_to?(:railtie_routes_url_helpers) }
              klass.include(namespace.railtie_routes_url_helpers(include_path_helpers))
            else
              klass.include(routes.url_helpers(include_path_helpers))
            end
          end
        end
      end
    end
  end
end

Version data entries

90 entries across 90 versions & 5 rubygems

Version Path
actionpack-5.2.8.1 lib/abstract_controller/railties/routes_helpers.rb
actionpack-5.2.8 lib/abstract_controller/railties/routes_helpers.rb
actionpack-5.2.7.1 lib/abstract_controller/railties/routes_helpers.rb
actionpack-5.2.7 lib/abstract_controller/railties/routes_helpers.rb
actionpack-5.2.6.3 lib/abstract_controller/railties/routes_helpers.rb
actionpack-5.2.6.2 lib/abstract_controller/railties/routes_helpers.rb
actionpack-5.2.6.1 lib/abstract_controller/railties/routes_helpers.rb
actionpack-5.2.6 lib/abstract_controller/railties/routes_helpers.rb
actionpack-5.2.4.6 lib/abstract_controller/railties/routes_helpers.rb
actionpack-5.2.5 lib/abstract_controller/railties/routes_helpers.rb
actionpack-5.2.4.5 lib/abstract_controller/railties/routes_helpers.rb
actionpack-5.2.4.4 lib/abstract_controller/railties/routes_helpers.rb
actionpack-5.2.4.3 lib/abstract_controller/railties/routes_helpers.rb
actionpack-5.2.4.2 lib/abstract_controller/railties/routes_helpers.rb
actionpack-5.2.4.1 lib/abstract_controller/railties/routes_helpers.rb
zuora_connect_ui-0.10.0 vendor/ruby/2.6.0/gems/actionpack-5.2.3/lib/abstract_controller/railties/routes_helpers.rb
actionpack-5.2.4 lib/abstract_controller/railties/routes_helpers.rb
actionpack-5.2.4.rc1 lib/abstract_controller/railties/routes_helpers.rb
zuora_connect_ui-0.9.2 vendor/ruby/2.6.0/gems/actionpack-5.2.3/lib/abstract_controller/railties/routes_helpers.rb
zuora_connect_ui-0.9.1 vendor/ruby/2.6.0/gems/actionpack-5.2.3/lib/abstract_controller/railties/routes_helpers.rb