Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading… in routes and helpers (0.3.0) #91

shimaore opened this Issue · 0 comments

1 participant


Idea: let's use to represent the databag inside routes and helpers. This is especially convenient in helpers where values might come from req.query or req.body (when using bodyDecoder) depending on the calling environment (get vs post). In routes @data would allow for pre-0.3-like semantics (= more direct migration strategy).

Suggested changes:
line 265

      if app.settings['databag']
        args[1].params =

line 287

    if app.settings['databag'] = {}
      copy_data_to, [req.query, req.params, req.body]

line 292

    switch app.settings['databag']
      when 'this' then result = r.handler.apply(, [ctx])
      when 'param' then result = r.handler.apply(ctx, [])
      else result = r.handler.apply(ctx, [ctx])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.