我有这个jQuery AJAX成功ajax调用后呈现部分?
$.ajax({
url: "/update_fb_user?fb_uid=" + FB.getSession().uid,
dataType: 'json',
success: function(data){
if(data.user != "none"){
// here is where i need to render this partial
}else{
window.location.href = '/signup';
}
}
这里是视图
<div id="fb_iframe">
<% unless current_user.not_using_facebook? %>
<%= render :partial => 'fb_iframe' %>
<% end %>
</div>
我thinkng的只是做fb_iframe
的部分呼叫,但有要么使部分或重新检查的方式unless
块,因为ajax调用更新它,以便unless
条件为真...关于如何实现这一点或任何方式做到这一点的任何想法?