Skip to content

Commit

Permalink
Updated syntax from @page[:something] to @page.content_for(:something…
Browse files Browse the repository at this point in the history
…) as the former is deprecated.
  • Loading branch information
parndt committed Sep 2, 2011
1 parent 353f6c8 commit d4741be
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -217,10 +217,10 @@ Replace the contents of +app/views/pages/show.html.erb+ with this:

<erb>
<section id='body_content'>
<%=raw @page[:body] %>
<%=raw @page.content_for(:body) %>
</section>
<section id='side_body_content'>
<%=raw @page[:side_body] %>
<%=raw @page.content_for(:side_body) %>
</section>
</erb>

Expand All @@ -235,7 +235,7 @@ When you edit the about page you'll see something like this:
You'll notice two tabs on the page "Body" and "Side Body". These are +Page Parts+, or in other words a single piece of content attached to this page that you can render in your view. There is a "Body" tab with some content on this screen, to render that same content in your view you put:

<erb>
<%=raw @page[:body] %>
<%=raw @page.content_for(:body) %>
</erb>

h4. Styling your views
Expand Down

0 comments on commit d4741be

Please sign in to comment.