Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updated for recent changes in Grasshopper's API.

  • Loading branch information...
commit 0070c3cc25a4ccedf1dce27e55e53a177600e1bd 1 parent 94a55b3
@tuxychandru tuxychandru authored committed
View
8 articles/grasshopper-shoutbox.markdown
@@ -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.
@@ -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']) { %>
@@ -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>
<% }); %>
View
6 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']) { %>
@@ -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>
<% }); %>
View
2  articles/grasshopper-shoutbox/views/layout.html
@@ -11,7 +11,7 @@
<div id="boxtop"></div>
<div id="content">
- <%= include(view) %>
+ <% include(view); %>
</div>
<div id="boxbot"></div>
</div>
Please sign in to comment.
Something went wrong with that request. Please try again.