class ActionDispatch::Routing::Mapper::Mapping
def route_source_location
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