From 39326bec2d36a936137b0fbdd23e6a39e7293793 Mon Sep 17 00:00:00 2001 From: Nils Dittberner Date: Wed, 16 Nov 2016 16:05:04 +0100 Subject: [PATCH] Fixed to short title. --- app/models/product.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/product.rb b/app/models/product.rb index 94e597e..97bb02f 100644 --- a/app/models/product.rb +++ b/app/models/product.rb @@ -5,7 +5,7 @@ class Product < ApplicationRecord validates :title, :description, :image_url, :price, presence: true validates :price, numericality: {greater_than_or_equal_to: 0.01} - validates :title, uniqueness: true, length: { minimum: 5, maximum: 30 } + validates :title, uniqueness: true, length: { minimum: 5, maximum: 60 } validates :image_url, allow_blank: true, format: { with: %r{\.(gif|jpg|png)\Z}i, message: 'must be URL for GIF, JPG or PNG image.'