Ah mark and I were just talking about that too. Will do.
On Nov 2, 2013 6:19 AM, "Joe Wegner" <notifications@github.com> wrote:

> In api/v0/controllers/keys.coffee:
>
> > -					else if !key.length
> > -						#Key doesn't exist, so let's create a new one
> > -						console.log "Key doesn't exist.  Creating"
> > -						@helpers.generateKey (err, key) =>
> > -							if err
> > -								@responses.internalError res, "Error generating key.  This probably isn't your fault."
> > -							else
> > -								console.log "Key generated.  Persisting"
> > -								Keys.createUserKeyWithIdentifier req.session.user, params.identifier, key, (err, keyObj) =>
> > -									if err
> > -										@responses.internalError res, "Your key didn't exist, so we tried to create a new one.  We got an error.  It probably wasn't your fault."
> > -									else
> > -										@responses.respond res,
> > -											key: keyObj
> > -
> > +				Users.getByIdentifier req.session.user.identifier, (err, existingUser) ->
>
> @jessepollak <https://github.com/jessepollak> You can remove the helpers
> = @helpers if you change -> to =>.
>
> @, in coffeescript refers to this. In this case, the -> is a callback
> that changes the scope, so this is no longer referring to the controller
> action. Using => instead of -> tells coffee script to work some magic and
> reset the scope so that @ still refers to the parent this. Check out the fat
> arrow documentation <http://coffeescript.org/#fat-arrow>
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/waltzio/cy/pull/12/files#r7387560>
> .
>