I have the simple view page:
<div id="test1"></div>
<%= link_to_remote "Turn on Alert", :url => {:controller =>
"alerts",
:action => "new"} :update => "test1" %>
Then in my controller I simply do
if request.xhr?
render :text => "AJAX Called"
else
redirect_to :back
end
It''s hitting the request.xhr? block as I had a logger.info statement
there. However the "test1" div is not saying "AJAX Called".
Nothing
appears.
Help?
--
Posted via http://www.ruby-forum.com/.
One thing I forgot to add, I have a nested div actually b/c my layout has a div. So the above is really <div id="main"> <div id="test1"></div> </div> Could this be the problem? -- Posted via http://www.ruby-forum.com/.