Fixed redirect after post update
This commit is contained in:
1 parent
ee583db78e
commit
89f8e23d92
1 file changed
+1
-1
@@ -35,7 +35,7 @@ class PostsController < ApplicationController
|
|||||||
def update
|
def update
|
||||||
if @post.update_attributes(params[:post])
|
if @post.update_attributes(params[:post])
|
||||||
flash[:notice] = "Post was successfully updated."
|
flash[:notice] = "Post was successfully updated."
|
||||||
redirect_to topic_path(@post.topic)
|
redirect_to topic_path(@post.topic, :page => @post.topic.posts.page.per(10).num_pages, :anchor => @post.id)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user