Skip to content

Instantly share code, notes, and snippets.

@inossidabile
Created June 4, 2012 21:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save inossidabile/2870880 to your computer and use it in GitHub Desktop.
Save inossidabile/2870880 to your computer and use it in GitHub Desktop.
class @FooPage extends ApplicationPage
@fetch (complete) ->
Post.find 'all', (posts) ->
@data.posts = posts
complete
!= @widget 'div', => new PostsWidget(@posts)
class PostsWidget extends Joosy.Widget
constructor: (posts) ->
@data.posts = posts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment