Fixed redirect after post update
This commit is contained in:
@@ -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