mostrar otro mensaje cuando la ficha está incompleta
This commit is contained in:
parent
3fbffd5e7a
commit
922f671114
1 changed files with 6 additions and 1 deletions
|
@ -62,7 +62,12 @@ class PostsController < ApplicationController
|
|||
@post.update_attributes(author: current_user.username) unless @post.author
|
||||
|
||||
if @post.save
|
||||
if @post.incomplete?
|
||||
flash[:info] = @site.config.dig('incomplete')
|
||||
else
|
||||
flash[:success] = @site.config.dig('thanks')
|
||||
end
|
||||
|
||||
redirect_to site_posts_path(@site, lang: @lang)
|
||||
else
|
||||
@invalid = true
|
||||
|
|
Loading…
Reference in a new issue