Sha256: 3d113870c0691a0a558538db12be2b6a40661cd6740ce92bf9182695c6b25279

Contents?: true

Size: 659 Bytes

Versions: 18

Compression:

Stored size: 659 Bytes

Contents

# frozen_string_literal: true

require "active_support/core_ext/module/introspection"

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.module_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

18 entries across 18 versions & 4 rubygems

Version Path
minato_ruby_api_client-0.2.2 vendor/bundle/ruby/3.2.0/gems/actionpack-7.1.3.4/lib/abstract_controller/railties/routes_helpers.rb
actionpack-7.1.5.1 lib/abstract_controller/railties/routes_helpers.rb
actionpack-7.1.5 lib/abstract_controller/railties/routes_helpers.rb
actionpack-7.1.4.2 lib/abstract_controller/railties/routes_helpers.rb
actionpack-7.1.4.1 lib/abstract_controller/railties/routes_helpers.rb
actionpack-7.1.4 lib/abstract_controller/railties/routes_helpers.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/actionpack-7.1.3.4/lib/abstract_controller/railties/routes_helpers.rb
tinymce-rails-7.1.2 vendor/bundle/ruby/3.3.0/gems/actionpack-7.1.3.4/lib/abstract_controller/railties/routes_helpers.rb
actionpack-7.1.3.4 lib/abstract_controller/railties/routes_helpers.rb
actionpack-7.1.3.2 lib/abstract_controller/railties/routes_helpers.rb
actionpack-7.1.3.1 lib/abstract_controller/railties/routes_helpers.rb
actionpack-7.1.3 lib/abstract_controller/railties/routes_helpers.rb
actionpack-7.1.2 lib/abstract_controller/railties/routes_helpers.rb
actionpack-7.1.1 lib/abstract_controller/railties/routes_helpers.rb
actionpack-7.1.0 lib/abstract_controller/railties/routes_helpers.rb
actionpack-7.1.0.rc2 lib/abstract_controller/railties/routes_helpers.rb
actionpack-7.1.0.rc1 lib/abstract_controller/railties/routes_helpers.rb
actionpack-7.1.0.beta1 lib/abstract_controller/railties/routes_helpers.rb