Extract Partial
Extracting a partial is a technique used for removing complex or duplicated view code from your application. This is the equivalent of using Long Method⭐ and Extract Method⭐ in your views and templates.
• Create a new file for partial prefixed with an underscore (_file- name.html.erb). • Move common code into newly created file. • Render the partial from the source file.