method
controller_relative_to
v1.2.6 -
Show latest stable
- Class:
ActionController::Routing
controller_relative_to(controller, previous)public
No documentation available.
# File actionpack/lib/action_controller/routing.rb, line 310
def controller_relative_to(controller, previous)
if controller.nil? then previous
elsif controller[0] == ?/ then controller[1..-1]
elsif %r{^(.*)/} =~ previous then "#{$1}/#{controller}"
else controller
end
end