Closed mbajur closed 10 years ago
After further investigation, i've found that 304 should be handled by ajax:success
(and ajax:complete
) events but it's not for some reason. The question is - is that Apotomo's fault or not?
Hi Mike!
The generation of the response is done here: https://github.com/apotonick/apotomo/blob/master/lib/apotomo/rails/controller_methods.rb#L70
I totally agree that this could be a little bit more customizable - play around with it and tell me what settings would work for you.
Ok, it turned out that it was caused by something else. complete
and success
events are not working cause i'm replacing the button element (on which i'm listening for those events) with apotomo. That's a known UJS issue and has nothing to do with Apotomo.
Thanks for your help!
Hello! I'm trying to use Apotomo to create a simple tabable widget. It's not using any database data and it's not querying it. Just a partials loaded to tab contents. My widget code looks like that:
And now, to the point - i need to use ajax events to add some animation stuff to my logic but the problem is, that
show_filters
returns304 Not Modified
status which breaks theon('ajax:complete')
and any other javascript event (onlybeforeSend
works) cause it seems, that they expect different status codes in request response. (more info on rails ajax events: http://bit.ly/1iVgLpN)The question is - can i set a custom response code for my widget methods? Thanks in advance!