def create
      @category = LatoBlog::Category.new(new_category_params)

      if !@category.save
        flash[:danger] = @category.errors.full_messages.to_sentence
        redirect_to lato_blog.new_category_path
        return
      end

      flash[:success] = LANGUAGES[:lato_blog][:flashes][:category_create_success]
      redirect_to lato_blog.category_path(@category.id)
    end
def create
      @category = LatoBlog::Category.new(new_category_params)

      if !@category.save
        flash[:danger] = @category.errors.full_messages.to_sentence
        redirect_to lato_blog.new_category_path
        return
      end

      flash[:success] = LANGUAGES[:lato_blog][:flashes][:category_create_success]
      redirect_to lato_blog.category_path(@category.id)
    end
This function creates a new category.