Skip to content

Instantly share code, notes, and snippets.

@mauricemach
Created November 16, 2010 20:20
Show Gist options
  • Save mauricemach/702436 to your computer and use it in GitHub Desktop.
Save mauricemach/702436 to your computer and use it in GitHub Desktop.
Proposed API for partials.
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