Skip to content

Instantly share code, notes, and snippets.

@avgerin0s
Created May 19, 2013 22:53
Show Gist options
  • Save avgerin0s/5609378 to your computer and use it in GitHub Desktop.
Save avgerin0s/5609378 to your computer and use it in GitHub Desktop.
tableFor "posts", (t) ->
t.head ->
t.row ->
t.cell "title", sort: true
t.cell "body", sort: true
t.cell()
t.cell()
t.cell()
t.body ->
for post in @posts
t.row ->
t.cell post.get("title")
t.cell post.get("body")
t.cell linkTo 'Show', urlFor(post)
t.cell linkTo 'Edit', urlFor(post, action: "edit")
t.cell linkTo 'Destroy', urlFor(post), method: "delete"
linkTo 'New Post', urlFor(App.Post, action.new)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment