RubyMine
 
Get RubyMine

Extract partial

Last modified: 11 February 2024

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: