RubyMine
 
Get RubyMine
You are viewing the documentation for an earlier version of RubyMine.

Extract partial

Last modified: 09 August 2022

Refactor | Extract/Introduce | Partial

The Extract Partial refactoring allows you to remove duplication in a view by extracting its fragment to a partial view. You can apply this refactoring to .html.erb and .html.haml files.

To extract a view fragment to a partial view, do the following: