Hi guys,
I'm trying to make an AJAX enabled web page using rails and jQuery. The problem that I am running into is that when I try and load a view into a div using jQuery's AJAX method I am getting my application layout returned with the view. Is there a way to only retrieve the view data if it's an AJAX request, but load my application layout as well if its not an AJAX request?
Here's the controllers method that I am calling:
def new
   @blog = Blog.new
   respond_to do |format|
       format.html # Goes to the new.html.erb view.
       format.xml { render :xml => @blog }
   end
end
Thanks for the help.