Sha256: 605d3954f1f690265c50ffca11a1c1334d13e09bf547e231f886d2a8bfc09abd

Contents?: true

Size: 564 Bytes

Versions: 55

Compression:

Stored size: 564 Bytes

Contents

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

55 entries across 55 versions & 4 rubygems

Version Path
actionpack-5.1.7 lib/abstract_controller/railties/routes_helpers.rb
actionpack-5.1.7.rc1 lib/abstract_controller/railties/routes_helpers.rb
actionpack-5.1.6.2 lib/abstract_controller/railties/routes_helpers.rb
actionpack-5.0.7.2 lib/abstract_controller/railties/routes_helpers.rb
actionpack-5.1.6.1 lib/abstract_controller/railties/routes_helpers.rb
actionpack-5.0.7.1 lib/abstract_controller/railties/routes_helpers.rb
actionpack-5.1.6 lib/abstract_controller/railties/routes_helpers.rb
actionpack-5.0.7 lib/abstract_controller/railties/routes_helpers.rb
actionpack-5.1.5 lib/abstract_controller/railties/routes_helpers.rb
actionpack-5.1.5.rc1 lib/abstract_controller/railties/routes_helpers.rb
actionpack-5.1.4 lib/abstract_controller/railties/routes_helpers.rb
actionpack-5.0.6 lib/abstract_controller/railties/routes_helpers.rb
actionpack-5.1.4.rc1 lib/abstract_controller/railties/routes_helpers.rb
actionpack-5.0.6.rc1 lib/abstract_controller/railties/routes_helpers.rb
actionpack-5.1.3 lib/abstract_controller/railties/routes_helpers.rb
actionpack-5.1.3.rc3 lib/abstract_controller/railties/routes_helpers.rb
actionpack-5.0.5 lib/abstract_controller/railties/routes_helpers.rb
actionpack-5.0.5.rc2 lib/abstract_controller/railties/routes_helpers.rb
actionpack-5.1.3.rc2 lib/abstract_controller/railties/routes_helpers.rb
actionpack-5.0.5.rc1 lib/abstract_controller/railties/routes_helpers.rb