I have a problem. I have an rails webpage and I am loading all the pages with jquery.
It all works as expected except when I try to access an URL that is rendered partial from the browser – I type in the browser http://www.mywebsite.something/aPageThatIsRenderedPartial.
As expected it is rendered partial and the layout is not loaded.
So my question is can I do some rails magic to render all if main layout is not loaded?
I will try to make this as clear as I can with my limited English skills:) :
Is it possible to something like this in the controller
If mainLayout is not loaded
then render :layout => true
else render :layout => false
Thanks again.
Just use different
respond_toblocks:Don’t forget to specify format for your AJAX request as JSON, or change url to
www.mywebsite.something/aPageThatIsRenderedPartial.jsonfor JQuery Get request.