mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-15 04:21:41 +00:00
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
|
||||
flash[:success] = @site.config.dig('thanks')
|
||||
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