Reputation: 1755
I have template file .erb with HTML code inside.
How to include it in another file erb?
I tried to use section
but this is not that I need
Upvotes: 1
Views: 3275
Reputation: 13477
You are looking for render
:
<%= render('file_folder/other_file') %>
Note, that you can omit .html.erb
part of the file name.
Upvotes: 4