igor-alexandrov / wiselinks

If Turbolinks are not enough for you. Wiselinks makes your application work faster.
MIT License
724 stars 89 forks source link

Fix events url variable #23

Closed incubus closed 11 years ago

coveralls commented 11 years ago

Coverage Status

Coverage remained the same when pulling 3feaed5ceada514738703761715605439c7aade1 on incubus:master into e67889db715c1e9bf8da6e6ac05e9a72be280927 on igor-alexandrov:master.

igor-alexandrov commented 11 years ago

I don't think that you are right here. Is there any purpose to send complete state to event?

incubus commented 11 years ago

Agree, I just want to send the url variable. But that is your code. :)

  _done: ($target, status, state, data) ->
    $(document).trigger('page:done', [$target, status, state.url, data])

  _fail: ($target, status, state, error) ->
    $(document).trigger('page:fail', [$target, status, state.url, error])

  _always: ($target, status, state) ->
    $(document).trigger('page:always', [$target, status, state.url])
igor-alexandrov commented 11 years ago

And what is wrong with it? The only way to fetch right URL is to fetch it from state.url.

incubus commented 11 years ago

I just fix a typo. You send state.url to the function and use state.url again into it. Please take a look on my pull request. :)

incubus commented 11 years ago

Here is another version of the fix.

igor-alexandrov commented 11 years ago

:+1: Wow! I see now!

Will be merged today.

coveralls commented 11 years ago

Coverage Status

Coverage remained the same when pulling b51d340623f26e04cdf31e3536dcc66a6294d64c on incubus:master into e67889db715c1e9bf8da6e6ac05e9a72be280927 on igor-alexandrov:master.

igor-alexandrov commented 11 years ago

Done in wiselinks-0.7.0. Thanks!