5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-07-01 23:26:07 +00:00

no fallar al ir a un artículo después de crearlo

This commit is contained in:
f 2020-07-24 15:03:13 -03:00
parent 37e46af665
commit 7dcb5e8d89

View file

@ -54,8 +54,9 @@ class PostsController < ApplicationController
service = PostService.new(site: @site,
usuarie: current_usuarie,
params: params)
@post = service.create
if (@post = service.create.persisted?)
if @post.persisted?
@site.touch
redirect_to site_post_path(@site, @post)