method

editor_url

rails latest stable - Class: ActionDispatch::DebugView

Method not available on this version

This method is only available on newer versions. The first available version (v8.1.1) is shown here.

editor_url(location, line: nil)
public

No documentation available.

# File actionpack/lib/action_dispatch/middleware/debug_view.rb, line 58
    def editor_url(location, line: nil)
      if editor = ActiveSupport::Editor.current
        line ||= location&.lineno
        absolute_path = location&.absolute_path

        if absolute_path && line && File.exist?(absolute_path)
          editor.url_for(absolute_path, line)
        end
      end
    end