fix for edit forum post links
This commit is contained in:
@@ -42,7 +42,7 @@ class ForumPostsController < ApplicationController
|
|||||||
@forum_post = ForumPost.find(params[:id])
|
@forum_post = ForumPost.find(params[:id])
|
||||||
check_privilege(@forum_post)
|
check_privilege(@forum_post)
|
||||||
@forum_post.update_attributes(params[: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
|
end
|
||||||
|
|
||||||
def destroy
|
def destroy
|
||||||
|
|||||||
@@ -23,9 +23,12 @@
|
|||||||
<% else %>
|
<% else %>
|
||||||
<li><%= link_to "Delete", forum_post_path(forum_post.id), :confirm => "Do you really want to delete this post?", :method => :delete, :remote => true %></li>
|
<li><%= link_to "Delete", forum_post_path(forum_post.id), :confirm => "Do you really want to delete this post?", :method => :delete, :remote => true %></li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<li><%= link_to "Edit", edit_forum_post_path(forum_post.id) %></li>
|
|
||||||
<li><%= link_to "Permalink", forum_post_path(forum_post) %></li>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<% if forum_post.editable_by?(CurrentUser.user) %>
|
||||||
|
<li><%= link_to "Edit", edit_forum_post_path(forum_post.id) %></li>
|
||||||
|
<% end %>
|
||||||
|
<li><%= link_to "Parent", forum_topic_path(forum_post.topic) %></li>
|
||||||
|
<li><%= link_to "Permalink", forum_post_path(forum_post) %></li>
|
||||||
</menu>
|
</menu>
|
||||||
</div>
|
</div>
|
||||||
<div class="clearfix"></div>
|
<div class="clearfix"></div>
|
||||||
|
|||||||
Reference in New Issue
Block a user