diff --git a/app/controllers/posts_controller.rb b/app/controllers/posts_controller.rb index 35610b5..07017d3 100644 --- a/app/controllers/posts_controller.rb +++ b/app/controllers/posts_controller.rb @@ -58,7 +58,7 @@ class PostsController < ApplicationController if (@post = service.create.persisted?) @site.touch - redirect_to site_posts_path(@site) + redirect_to site_post_path(@site, @post) else render 'posts/new' end @@ -87,7 +87,7 @@ class PostsController < ApplicationController if service.update.persisted? @site.touch - redirect_to site_posts_path(@site) + redirect_to site_post_path(@site, @post) else render 'posts/edit' end