5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-07-04 00:05:45 +00:00

mostrar otro mensaje cuando la ficha está incompleta

This commit is contained in:
f 2019-04-22 16:50:14 -03:00
parent 3fbffd5e7a
commit 922f671114
No known key found for this signature in database
GPG key ID: 2AE5A13E321F953D

View file

@ -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