<% if @in_user_homepage %> <% homepage = BlogComment.find(User.current.blog.homepage_id) %> $("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'blogs/homepage', :locals => {:activity => @blog_comment, :user_activity_id => homepage.id}) %>"); <% else%> $("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/user_blog', :locals => {:activity => @blog_comment,:user_activity_id =>@user_activity_id}) %>"); <% end %> sd_create_editor_from_data(<%= @user_activity_id%>,"","100%", 'UserActivity');