Method deprecated or moved
This method is deprecated or moved on the latest stable version.
The last existing version (v4.1.8) is shown here.
use_relative_controller!()
public
if the current controller
is “foo/bar/baz” and controller: “baz/bat” is specified, the controller
becomes “foo/baz/bat”
# File actionpack/lib/action_dispatch/routing/route_set.rb, line 575
def use_relative_controller!
if !named_route && different_controller? && !controller.start_with?("/")
old_parts = current_controller.split('/')
size = controller.count("/") + 1
parts = old_parts[0...-size] << controller
@options[:controller] = parts.join("/")
end
end