I'm coming from PHP development and I'm trying to learn Ruby on Rails. I'd like to know what is the best practice for inserting headers and footers? Typically in PHP i'd just do include('header.php');
and then include('footer.php');
Now I'm trying to learn Ruby on Rails and trying to understand how or where I should put these header/footer files?
I created a new application
rails new new_app
Then I generated a new controller
rails generate controller SignUp
This created some files and folders. I've developed some HTML inside the new new_app/views/sign_up
folder, but I'd like to include header and footer to this page and for future pages. Where should I have these files? In the same folder? or under the default folder in new_app/views/layouts
? Also, how do I even include files once I created them?
I'm new to ruby on rails development and I'd like to gain some knowledge from experts! Thanks!