https://github.com/dewski/open-rails-partial-vscode-extension
VS Code extension that supports opening Rails partials found in development from the browser.
https://github.com/dewski/open-rails-partial-vscode-extension
Last synced: 3 months ago
JSON representation
VS Code extension that supports opening Rails partials found in development from the browser.
- Host: GitHub
- URL: https://github.com/dewski/open-rails-partial-vscode-extension
- Owner: dewski
- License: mit
- Created: 2023-06-01T17:51:46.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-06-06T00:05:51.000Z (almost 3 years ago)
- Last Synced: 2025-01-23T16:53:50.582Z (about 1 year ago)
- Language: TypeScript
- Size: 94.7 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Open Rails Partial VS Code Extension
`dewski.open-rails-partial` allows you to open Rails partials directly from your browser using the [Open Rails Partial](https://github.com/dewski/open-rails-partial-chrome-extension) Chrome Extension.
## Known Issues
This extension works by checking to see if a filepath exists in any of the workspaces you have open in the current window. When the Chrome extension activates this VS Code extension using the `vscode://dewski.open-rails-partial/partial` URL, it will open the file in the first workspace that matches the filepath.
If the file is not found in any of the workspaces of the last open window, it will return an error requiring you to bring focus to the window that has the workspace for the Rails project you are opening a partial for.
## Why is this extension necessary?
As Rails only includes the partial path relative to the root of the Rails project, we do not have access to the absolute path of the file. The built-in `vscode://file/path/to/file` URL scheme requires the absolute path of the file to open it in VS Code.
Additionally, projects in remote workspaces such as Codespaces are not supported by the built-in `vscode://file/path/to/file` URL scheme.