después de crear o modificar un articulo ir a su ficha

This commit is contained in:
f 2020-07-22 20:36:34 -03:00
parent 52d26918b5
commit f3fabecf83

View file

@ -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