个人博客,回复博客后,跳入带id的页面

This commit is contained in:
daiao 2017-01-13 17:11:15 +08:00
parent cd76f92405
commit 0cf17b999f
2 changed files with 2 additions and 2 deletions

View File

@ -185,7 +185,7 @@ class BlogCommentsController < ApplicationController
if params[:course_id] #如果呆了course_id过来了那么这是要跳到课程大纲去的 if params[:course_id] #如果呆了course_id过来了那么这是要跳到课程大纲去的
redirect_to syllabus_course_path(:id=>params[:course_id]) redirect_to syllabus_course_path(:id=>params[:course_id])
else else
redirect_to user_blog_blog_comment_path(:user_id => @article.author_id, :blog_id => @article.blog_id, :id => @article) redirect_to user_blog_blog_comment_path( @article.author, :blog_id => @article.blog_id, :id => @article)
end end
} }

View File

@ -18,7 +18,7 @@
<% if @user_activity_id.to_i != @root.id %> <% if @user_activity_id.to_i != @root.id %>
$("#activity_post_reply_<%= @user_activity_id%>").html("<%= escape_javascript(render :partial => 'users/user_blog_post_reply', :locals => {:activity => @root,:user_activity_id =>@user_activity_id}) %>"); $("#activity_post_reply_<%= @user_activity_id%>").html("<%= escape_javascript(render :partial => 'users/user_blog_post_reply', :locals => {:activity => @root,:user_activity_id =>@user_activity_id}) %>");
<% else %> <% else %>
window.location.href = "<%=user_blog_blog_comment_path(:user_id => @root.author_id,:blog_id=>@root.blog_id,:id=>@root.id) %>"; window.location.href = "<%=user_blog_blog_comment_path(:user_id => @root.author,:blog_id => @root.blog_id,:id => @root.id) %>";
<% end %> <% end %>
<% elsif @type == 'News' || params[:type] == 'Comment' %> <% elsif @type == 'News' || params[:type] == 'Comment' %>
<% if @user_activity_id.to_i != @root.id %> <% if @user_activity_id.to_i != @root.id %>