Topic: Learning rails: Convert collection of HTML files to partials

I am very very new to rails and have read "why's poignant guide" and gone through some tutorials but have a specific question to ask.

I have a website that I keep needing to update, and it is a pain in the you know where to go through each html file header.  I figure => I should use rails and make some partials yeah?

But, I have no idea how to implement this.  I assume I would need one controller for the whole website, and for each page request, I would have to piece together the relevant partials?  If this is right, how do I do this?  If this is wrong, can you tell me how I could do this?

Thanks in advace! (you will get more thanks after - sorta a half now, half later thing)

Re: Learning rails: Convert collection of HTML files to partials


Rails works as a collection of templates anyway.  I structure as follows:

Everything that will be the same on every page goes into application.html.erb

Each action in a controller has its own view that is rendered within application.html.erb

I use partials for forms where I would be duplicating edit/new views

So, application.html.erb is in short:

<h1>App title</h1>
<div id="main-content">
<%= yield %> #individual views are then inserted here

This avoids having to change the header in each file.