From 0070c3cc25a4ccedf1dce27e55e53a177600e1bd Mon Sep 17 00:00:00 2001 From: Chandra Sekar S Date: Tue, 19 Oct 2010 11:18:14 +0530 Subject: [PATCH] Updated for recent changes in Grasshopper's API. --- articles/grasshopper-shoutbox.markdown | 8 ++++---- articles/grasshopper-shoutbox/views/index.html | 6 +++--- articles/grasshopper-shoutbox/views/layout.html | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/articles/grasshopper-shoutbox.markdown b/articles/grasshopper-shoutbox.markdown index ef2367d..4c1747b 100644 --- a/articles/grasshopper-shoutbox.markdown +++ b/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) { %>

- <%= errors(shout).join('

') %> + <%h errors(shout).join('

') %>

<% } %> <% if(flash['success']) { %> @@ -157,10 +157,10 @@ It then lists all the available shouts including the name and gravatar of the pe
Gravatar -

<%= h(shout.name()) %>

+

<%= shout.name() %>

-

<%= h(shout.message()) %>

+

<%= shout.message() %>

<% }); %> diff --git a/articles/grasshopper-shoutbox/views/index.html b/articles/grasshopper-shoutbox/views/index.html index 9eeca4c..ac7be69 100644 --- a/articles/grasshopper-shoutbox/views/index.html +++ b/articles/grasshopper-shoutbox/views/index.html @@ -1,6 +1,6 @@ <% if(shout.errors) { %>

- <%= errors(shout).join('

') %> + <%h errors(shout).join('

') %>

<% } %> <% if(flash['success']) { %> @@ -13,10 +13,10 @@
Gravatar -

<%= h(shout.name()) %>

+

<%= shout.name() %>

-

<%= h(shout.message()) %>

+

<%= shout.message() %>

<% }); %> diff --git a/articles/grasshopper-shoutbox/views/layout.html b/articles/grasshopper-shoutbox/views/layout.html index 992a8e6..9b4bb6c 100644 --- a/articles/grasshopper-shoutbox/views/layout.html +++ b/articles/grasshopper-shoutbox/views/layout.html @@ -11,7 +11,7 @@

Shoutbox

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