$('#photos').html("<%= escape_javascript(render(@photos))%>"); $('#tags').replaceWith("<%= escape_javascript(render(:partial => 'tags'))%>");