Skip to content

Commit

Permalink
Updated for recent changes in Grasshopper's API.
Browse files Browse the repository at this point in the history
  • Loading branch information
cskr authored and creationix committed Oct 19, 2010
1 parent 94a55b3 commit 0070c3c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions articles/grasshopper-shoutbox.markdown
Expand Up @@ -128,7 +128,7 @@ Grasshopper allows having an application wide layout into which the views of req

The layout file can use this piece of code to specify the location where the contents of the views have to be included.

<%= include(view) %>
<% include(view); %>

The layout for our shoutbox would look like this.

Expand All @@ -142,7 +142,7 @@ Our shoutbox has a single view as it does all the work on a single page. At the

<% if(shout.errors) { %>
<p class="error">
<%= errors(shout).join('</p><p class="error">') %>
<%h errors(shout).join('</p><p class="error">') %>
</p>
<% } %>
<% if(flash['success']) { %>
Expand All @@ -157,10 +157,10 @@ It then lists all the available shouts including the name and gravatar of the pe
<div class="meta">
<img src="http://www.gravatar.com/avatar/<%= shout.mailHash() %>"
alt="Gravatar" />
<p><%= h(shout.name()) %></p>
<p><%= shout.name() %></p>
</div>
<div class="shout">
<p><%= h(shout.message()) %></p>
<p><%= shout.message() %></p>
</div>
</li>
<% }); %>
Expand Down
6 changes: 3 additions & 3 deletions articles/grasshopper-shoutbox/views/index.html
@@ -1,6 +1,6 @@
<% if(shout.errors) { %>
<p class="error">
<%= errors(shout).join('</p><p class="error">') %>
<%h errors(shout).join('</p><p class="error">') %>
</p>
<% } %>
<% if(flash['success']) { %>
Expand All @@ -13,10 +13,10 @@
<div class="meta">
<img src="http://www.gravatar.com/avatar/<%= shout.mailHash() %>"
alt="Gravatar" />
<p><%= h(shout.name()) %></p>
<p><%= shout.name() %></p>
</div>
<div class="shout">
<p><%= h(shout.message()) %></p>
<p><%= shout.message() %></p>
</div>
</li>
<% }); %>
Expand Down
2 changes: 1 addition & 1 deletion articles/grasshopper-shoutbox/views/layout.html
Expand Up @@ -11,7 +11,7 @@ <h1>Shoutbox</h1>

<div id="boxtop"></div>
<div id="content">
<%= include(view) %>
<% include(view); %>
</div>
<div id="boxbot"></div>
</div>
Expand Down

0 comments on commit 0070c3c

Please sign in to comment.