def create
      @post = LatoBlog::Post.new(new_post_params)

      unless @post.save
        flash[:danger] = @post.errors.full_messages.to_sentence
        redirect_to lato_blog.new_post_path
        return
      end

      flash[:success] = LANGUAGES[:lato_blog][:flashes][:post_create_success]
      redirect_to lato_blog.post_path(@post.id)
    end
def create
      @post = LatoBlog::Post.new(new_post_params)

      unless @post.save
        flash[:danger] = @post.errors.full_messages.to_sentence
        redirect_to lato_blog.new_post_path
        return
      end

      flash[:success] = LANGUAGES[:lato_blog][:flashes][:post_create_success]
      redirect_to lato_blog.post_path(@post.id)
    end
This function creates a new post.