después de crear o modificar un articulo ir a su ficha
This commit is contained in:
parent
52d26918b5
commit
f3fabecf83
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue