You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using Sinatra and want to use Pjax but for some reason that I don't understand it is not working.
App:
get '/docs/*' do
if request.xhr?
puts "Sending a pjax request"
puts "docs/#{params[:splat].join('/')}.html"
haml :"docs/#{params[:splat].join('/')}.html", :layout => false
else
haml :"docs/#{params[:splat].join('/')}.html", :layout => :'docs_layout'
end
end
It seems that an ajax request is made but then something goes wrong and a non-ajax request is made, reloading the entire page. I am not sure where is the error.
I am using Sinatra and want to use Pjax but for some reason that I don't understand it is not working.
App:
Log:
Javascript:
HTML
http://pastebin.com/uVXmBzL1
It seems that an ajax request is made but then something goes wrong and a non-ajax request is made, reloading the entire page. I am not sure where is the error.
I did a:
And it gave me the right page, without layout. Maybe the problem is in the client side? But then, why the
In the server log?
I hope you can point me in the right direction :)
Thanks
The text was updated successfully, but these errors were encountered: