Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zappa Example is Outdated #92

Open
zeta0134 opened this issue Nov 1, 2011 · 0 comments
Open

Zappa Example is Outdated #92

zeta0134 opened this issue Nov 1, 2011 · 0 comments

Comments

@zeta0134
Copy link

zeta0134 commented Nov 1, 2011

With Zappa version 3, the syntax for the get and view functions has changed. Double check my syntax, this is just a quick conversion, but I think it should look like this:

@get '/': ->
  @render 'index',
    franks: ['miller', 'oz', 'sinatra', 'zappa']

@view index: ->
  for name in @franks
    a href: "http://en.wikipedia.org/wiki/Frank_#{name}", -> name

Basically, all the "magic" functions are attached to @ now, and sending variables to render functions is now done (by default) as an object parameter to the render function. Hooray for closures not being broken anymore. :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant