Created
November 16, 2010 20:20
-
-
Save mauricemach/702436 to your computer and use it in GitHub Desktop.
Proposed API for partials.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
get '/': -> | |
@items = [ | |
{name: 'coffeescript', url: 'http://coffeescript.org'} | |
{name: 'ruby', url: 'http://ruby-lang.org'} | |
{name: 'python', url: 'http://python.org'} | |
] | |
render 'default' | |
view -> | |
ul -> | |
for i in @items | |
render 'item', i: i | |
view item: -> | |
li -> a href: @i.url, -> @i.name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment