Click here to Skip to main content
15,892,575 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am building a small app using Ruby on Rails, and I am trying to rationalise my views.
Every view [.html.erb] is becoming the same thing:

HTML
<!DOCTYPE html>
<html lang="en">
  <%= render 'header' %>
  <body>
    <header>
      <h1>Page Title</h1>
    </header>
    <%= render 'menu' %>
    <section>
      <h2>Section</h2>
      <article>
        <!-- this is different -->
      </article>
    </section>
    <%= render 'footer' %>
  </body>
</html>


What I would like to do is have a single layout page with everything above and below the section block and then each unique page would just be the section block and the page title. Or something.

Any ideas?
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900