diff --git a/app/controllers/forum_posts_controller.rb b/app/controllers/forum_posts_controller.rb index 0cb56c33b..2d1d12bec 100644 --- a/app/controllers/forum_posts_controller.rb +++ b/app/controllers/forum_posts_controller.rb @@ -42,7 +42,7 @@ class ForumPostsController < ApplicationController @forum_post = ForumPost.find(params[:id]) check_privilege(@forum_post) @forum_post.update_attributes(params[:forum_post]) - respond_with(@forum_post, :location => forum_topic_path(@forum_post.topic, :page => @forum_post.topic.last_page)) + respond_with(@forum_post, :location => forum_post_path(@forum_post)) end def destroy diff --git a/app/views/forum_posts/_forum_post.html.erb b/app/views/forum_posts/_forum_post.html.erb index d763c33fa..ab7da7f32 100644 --- a/app/views/forum_posts/_forum_post.html.erb +++ b/app/views/forum_posts/_forum_post.html.erb @@ -23,9 +23,12 @@ <% else %>
  • <%= link_to "Delete", forum_post_path(forum_post.id), :confirm => "Do you really want to delete this post?", :method => :delete, :remote => true %>
  • <% end %> -
  • <%= link_to "Edit", edit_forum_post_path(forum_post.id) %>
  • -
  • <%= link_to "Permalink", forum_post_path(forum_post) %>
  • <% end %> + <% if forum_post.editable_by?(CurrentUser.user) %> +
  • <%= link_to "Edit", edit_forum_post_path(forum_post.id) %>
  • + <% end %> +
  • <%= link_to "Parent", forum_topic_path(forum_post.topic) %>
  • +
  • <%= link_to "Permalink", forum_post_path(forum_post) %>