Sha256: 77d92e34e115d4d505f809212ea07e8ad972a765c8ff7c44fd44d9da29a7bce8

Contents?: true

Size: 602 Bytes

Versions: 53

Compression:

Stored size: 602 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.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

53 entries across 51 versions & 5 rubygems

Version Path
actionpack-6.0.6.1 lib/abstract_controller/railties/routes_helpers.rb
actionpack-6.0.6 lib/abstract_controller/railties/routes_helpers.rb
actionpack-6.0.5.1 lib/abstract_controller/railties/routes_helpers.rb
actionpack-6.0.5 lib/abstract_controller/railties/routes_helpers.rb
actionpack-6.0.4.8 lib/abstract_controller/railties/routes_helpers.rb
actionpack-6.0.4.7 lib/abstract_controller/railties/routes_helpers.rb
actionpack-6.0.4.6 lib/abstract_controller/railties/routes_helpers.rb
actionpack-6.0.4.5 lib/abstract_controller/railties/routes_helpers.rb
actionpack-6.0.4.4 lib/abstract_controller/railties/routes_helpers.rb
actionpack-6.0.4.3 lib/abstract_controller/railties/routes_helpers.rb
actionpack-6.0.4.2 lib/abstract_controller/railties/routes_helpers.rb
actionpack-6.0.4.1 lib/abstract_controller/railties/routes_helpers.rb
actionpack-6.0.4 lib/abstract_controller/railties/routes_helpers.rb
actionpack-6.0.3.7 lib/abstract_controller/railties/routes_helpers.rb
actionpack-6.0.3.6 lib/abstract_controller/railties/routes_helpers.rb
actionpack-6.1.2.1 lib/abstract_controller/railties/routes_helpers.rb
actionpack-6.0.3.5 lib/abstract_controller/railties/routes_helpers.rb
actionpack-6.1.2 lib/abstract_controller/railties/routes_helpers.rb
actionpack-6.1.1 lib/abstract_controller/railties/routes_helpers.rb
actionpack-6.1.0 lib/abstract_controller/railties/routes_helpers.rb