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 @post.update_attributes(author: current_user.username) unless @post.author
if @post.save 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) redirect_to site_posts_path(@site, lang: @lang)
else else
@invalid = true @invalid = true