I have jquery 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'; } }
here is a partial call in the view
<div id="fb_iframe"> <% unless current_user.not_using_facebook? %> <%= render :partial => 'fb_iframe' %> <% end %> </div>
I was thinking that I was just fb_iframe , but there is a way to either partially or partially recheck the unless block, because the ajax call updates it, so unless condition unless true ... any ideas on how to achieve one or any way to do this?
source share