Groups
Groups
Sign in
Groups
Groups
Mustache
Conversations
About
Send feedback
Help
index.rb in the sinatra example
8 views
Skip to first unread message
Bert Fitié
unread,
Dec 6, 2009, 9:40:02 AM
12/6/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Mustache
I think there is a small error in the index.rb of the sinatra example.
I didn't get <h1>Mustache + Sinatra = Wonder</h1> in the home page.
After changing
class App
module Views
class Index < Mustache
def content
"Welcome! Mustache lives."
end
end
end
end
into
class App
module Views
class Index < Mustache
def title
@title
end
def content
"Welcome! Mustache lives."
end
end
end
end
I got the <h1>Mustache + Sinatra = Wonder</h1> in the home page
-- Bert
Chris Wanstrath
unread,
Dec 7, 2009, 12:42:56 PM
12/7/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to musta...@googlegroups.com
On Sun, Dec 6, 2009 at 6:40 AM, Bert Fitié <
be...@analytag.com
> wrote:
> I think there is a small error in the index.rb of the sinatra example.
> I didn't get <h1>Mustache + Sinatra = Wonder</h1> in the home page.
Nice catch! I've updated the example so that Index inherits from
Layout and the page renders as intended.
--
Chris Wanstrath
http://github.com/defunkt
Reply all
Reply to author
Forward
0 new messages