method
route_source_location
v7.2.3 -
Show latest stable
- Class:
ActionDispatch::Routing::Mapper::Mapping
route_source_location()public
No documentation available.
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 379
def route_source_location
if Mapper.route_source_locations
action_dispatch_dir = File.expand_path("..", __dir__)
Thread.each_caller_location do |location|
next if location.path.start_with?(action_dispatch_dir)
cleaned_path = Mapper.backtrace_cleaner.clean_frame(location.path)
next if cleaned_path.nil?
return "#{cleaned_path}:#{location.lineno}"
end
nil
end
end