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?)
|
if (@post = service.create.persisted?)
|
||||||
@site.touch
|
@site.touch
|
||||||
|
|
||||||
redirect_to site_posts_path(@site)
|
redirect_to site_post_path(@site, @post)
|
||||||
else
|
else
|
||||||
render 'posts/new'
|
render 'posts/new'
|
||||||
end
|
end
|
||||||
|
@ -87,7 +87,7 @@ class PostsController < ApplicationController
|
||||||
if service.update.persisted?
|
if service.update.persisted?
|
||||||
@site.touch
|
@site.touch
|
||||||
|
|
||||||
redirect_to site_posts_path(@site)
|
redirect_to site_post_path(@site, @post)
|
||||||
else
|
else
|
||||||
render 'posts/edit'
|
render 'posts/edit'
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue