Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Views

Partials

A partial is a reusable view component that can be shared between views.

Partials are typically used to avoid duplicating code between views, and to organize the code in a more modular way. Partials are defined as separate files that can be rendered from within other views.

Helpers

Helpers are Ruby methods that can be used in views to perform common tasks, such as formatting dates, generating links, or displaying images. Rails comes with a set of built-in helpers, and you can also define your own helpers to suit your application’s needs.

Layouts

A layout is a template that defines the overall structure of your application’s pages. Layouts typically include common elements such as headers, footers, and navigation menus, and can be used to provide a consistent look and feel across your application.