method
route_source_location
v7.1.3.2 -
Show latest stable
- Class:
ActionDispatch::Routing::Mapper::Mapping
route_source_location()public
No documentation available.
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 362
def route_source_location
if Mapper.route_source_locations
action_dispatch_dir = File.expand_path("..", __dir__)
caller_location = caller_locations.find { |location| !location.path.include?(action_dispatch_dir) }
cleaned_path = Mapper.backtrace_cleaner.clean([caller_location.path]).first
"#{cleaned_path}:#{caller_location.lineno}" if cleaned_path
end
end