# Rails navigation

> For the complete documentation index, see [llms.txt](https://www.jetbrains.com/help/ruby/llms.txt).

> **TL;DR**
> Navigate between Rails components: `Navigate | Related Symbol...` `Ctrl+Alt+Home` (Windows), `⌘ ⌃ ↑` (macOS), `⌘ ⌥ Home` (IntelliJ IDEA Classic (macOS)), `⌘ ⌃ ↓` (macOS System Shortcuts), `Ctrl+Alt+Home` (XWin), `Ctrl+Alt+Home` (GNOME), `Ctrl+Alt+Home` (KDE), `Ctrl+Alt+Home` (Emacs), `Ctrl+Alt+Home` (Sublime Text), `Ctrl+Alt+Home` (Sublime Text (macOS)), `Ctrl+Alt+F7` (Visual Studio), `⌘ ⇧ F7` (Visual Studio (macOS)), `Meta+Alt+Home` (TextMate), `Ctrl+Alt+Home` (NetBeans), `Ctrl+Alt+Home` (Eclipse), `⌘ ⌃ ↑` (Eclipse (macOS))

RubyMine helps you navigate between the Rails components, such as controllers, views, models, tests, and so on. For example, from a model, you can navigate to a controller, a table schema in `schema.rb` or `structure.sql`, a test, or a corresponding factory. Navigation capabilities are available in the editor, tool windows, and [model dependency diagrams](working-with-diagrams.html#model_diagram).

> **Tip:**
> To navigate between code elements of the specific file, use the [Structure tool window](viewing-structure-of-a-source-file.html).

## Navigate to a related Rails entity

To navigate between Rails components:

Procedure:

1. In the main menu, go to `Navigate | Related Symbol...` `Ctrl+Alt+Home` (Windows), `⌘ ⌃ ↑` (macOS), `⌘ ⌥ Home` (IntelliJ IDEA Classic (macOS)), `⌘ ⌃ ↓` (macOS System Shortcuts), `Ctrl+Alt+Home` (XWin), `Ctrl+Alt+Home` (GNOME), `Ctrl+Alt+Home` (KDE), `Ctrl+Alt+Home` (Emacs), `Ctrl+Alt+Home` (Sublime Text), `Ctrl+Alt+Home` (Sublime Text (macOS)), `Ctrl+Alt+F7` (Visual Studio), `⌘ ⇧ F7` (Visual Studio (macOS)), `Meta+Alt+Home` (TextMate), `Ctrl+Alt+Home` (NetBeans), `Ctrl+Alt+Home` (Eclipse), `⌘ ⌃ ↑` (Eclipse (macOS)).

2. Select the desired target from the popup menu, or press a corresponding key, specified on the left.

[Video](https://resources.jetbrains.com/help/img/idea/2026.3/rm_get_started_navigate_open_view_from_controller.mp4)

Below are few examples:

* Controller action -> View

* Controller action -> Route in `routes.rb`

* Model -> Factory

* Model -> Table schema in `schema.rb` or `structure.sql`

## Navigate to a related Rails entity using gutter icons

You can navigate between Rails components using gutter icons.

Procedure:

* If you want to jump to a view file associated with an action, open the corresponding controller, locate the desired action, and click the ![Go to view](https://resources.jetbrains.com/help/img/idea/2026.3/ruby.icons.rails.anyType%4012x12.svg) gutter icon next to the action definition.

[Video](https://resources.jetbrains.com/help/img/idea/2026.3/rm_navigate_rails_action_view.mp4)

To navigate back from a view to the corresponding action, open the view file in the editor, and click the ![Go to controller](https://resources.jetbrains.com/help/img/idea/2026.3/ruby.icons.rails.actionMethod%4012x12.svg) gutter icon.

[Video](https://resources.jetbrains.com/help/img/idea/2026.3/rm_get_started_navigate_open_controller_from_view.mp4)

* You can quickly navigate from a model to a `create_table` call in `schema.rb`, and the other way round. Open a desired model in the editor, and use the ![Go to schema definition](https://resources.jetbrains.com/help/img/idea/2026.3/app.expui.gutter.dataSchema.svg) gutter icon for navigation.

[Video](https://resources.jetbrains.com/help/img/idea/2026.3/rm_navigate_model_schema.mp4)

To navigate back from a `create_table` call to the model that uses the table, open `schema.rb` and click the ![Go to model definition](https://resources.jetbrains.com/help/img/idea/2026.3/app.nodes.modelClass.svg) gutter icon.

## Navigate to a declaration in routes.rb using inlay hints

You can use the URL path inlay hints to navigate from a controller action to the respective declaration in the `routes.rb` file.

Procedure:

1. Click an inlay hint above the required controller action to show the list of available actions for the URL.

2. Select Go to declaration or usages from the list.

[Video](https://resources.jetbrains.com/help/img/idea/2026.3/rm_go_to_declaration_URL_inlay_hints.mp4)

> **Tip:**
> To enable or disable the URL path inlay hints, go to `Settings | Editor | Inlay hints` and toggle the URL path checkbox.

## Navigate to partial declarations

The ![Partial declarations](https://resources.jetbrains.com/help/img/idea/2026.3/ruby.icons.ruby.partialModule%4014x14.svg) gutter icon in the editor marks a partial declaration. Pointing to this icon shows information about the other parts of the same declaration. To navigate to a partial declaration, click the gutter icon and select the desired part of the declaration from the popup.

[Video](https://resources.jetbrains.com/help/img/idea/2026.3/rm_navigate_rails_partial_declaration.mp4)

## Navigate with model dependency diagram

RubyMine allows you to jump from nodes/associations in a [model dependency diagram](working-with-diagrams.html) to corresponding classes in code.

To do this, right-click the required node/association in the diagram and select `Selected Element Actions | Jump to Source` `F4` (Windows), `⌘ ↓` (macOS), `F4` (IntelliJ IDEA Classic (macOS)), `F4` (macOS System Shortcuts), `F4` (XWin), `F4` (GNOME), `F4` (KDE), `F4` (Emacs), `F4` (Sublime Text), `F4` (Sublime Text (macOS)), `F4` (Visual Studio), `⌘ ↓` (Visual Studio (macOS)), `F4` (TextMate), `F4` (NetBeans), `F12` (Eclipse), `F3` (Eclipse (macOS)). If you have selected a one-to-many or many-to-many association, you can choose the desired association part.

[Video](https://resources.jetbrains.com/help/img/idea/2026.3/rm_navigate_rails_model_code.mp4)

## See also

### Procedures

[Code navigation](navigating-through-the-source-code.html)

