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

Already on GitHub? Sign in to your account

enableElement empties the html of the element if it is called twice #278

Open
fatshotty opened this Issue Sep 18, 2012 · 0 comments

Comments

Projects
None yet
1 participant

hello there,

around this line
https://github.com/rails/jquery-ujs/blob/master/src/rails.js#L315
you set the ujs:enable-with to false

but here:
https://github.com/rails/jquery-ujs/blob/master/src/rails.js#L311

you test the same property with !== undefined.
This condition returns true also the second time the method is invoked.

Is it a known issue or simply is the correct way to do that and I'm doing something wrong?

thanks in advance

PS: the method will be called twice because there is an error after ajax.
So, my action returns a 401 (error but correct).
Code performs a enableElement on error and enableElement again on complete.
Hope can help

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment