Xray Rails

screenshot of Xray Rails

A development tool that reveals your UI's bones

Overview

Xray is a gem designed specifically for Ruby on Rails developers, providing an innovative way to visualize the components of your user interface. With the ability to quickly reveal Rails views, partials, and JavaScript templates, it bridges the gap between your browser's developer tools and your application code. The philosophy is straightforward: enhance your development process by allowing you to navigate your UI's structure effortlessly and intuitively.

Utilizing a simple keyboard shortcut, Xray overlays details about the files that comprise your UI, enabling you to click and open them directly in your code editor. This tool is particularly beneficial for navigating complex applications where understanding the relationship between various UI components and the corresponding backend code can be challenging.

Features

  • Instant UI Insights: Reveal the structure of your UI components with a quick keyboard shortcut, improving your workflow and debugging efficiency.

  • Rails Views and Partials: Automatically exposes Rails views and partials, making it simple to trace UI elements back to their source code.

  • JavaScript Template Support: Supports JavaScript templates using the asset pipeline with the .jst extension, allowing seamless navigation through both front-end and back-end code.

  • Easy Installation: Requires jQuery and is added to your Gemfile or configuration, making the setup process straightforward for development environments.

  • Custom Editor Configuration: Automatically detects your preferred code editor through environment variables, or you can set it up in Xray's configuration settings.

  • Flexibility with Xray Disabling: Provides options to disable functionality for specific partials, granting developers greater control over how the tool interacts with their templates.

  • Community and Contributions Welcome: Encourages developer engagement, allowing input and collaboration on potential feature expansions or improvements.

Xray serves as a powerful enhancement to the Rails development toolkit, transforming how developers interact with their UI codebases and promoting a more efficient and user-friendly development environment.