method

route_source_location

Importance_0
v7.1.3.2 - Show latest stable - 0 notes - Class: ActionDispatch::Routing::Mapper::Mapping
route_source_location() public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# 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
Register or log in to add new notes.