From 66ec5269378c908f83975295d052fe07fd0a4203 Mon Sep 17 00:00:00 2001 From: f Date: Thu, 4 Nov 2021 10:42:57 -0300 Subject: [PATCH] permitir descripciones mas cortas --- app/models/site.rb | 2 +- app/views/sites/_form.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/site.rb b/app/models/site.rb index df92264..5b78d62 100644 --- a/app/models/site.rb +++ b/app/models/site.rb @@ -26,7 +26,7 @@ class Site < ApplicationRecord validates :design_id, presence: true validates_inclusion_of :status, in: %w[waiting enqueued building] validates_presence_of :title - validates :description, length: { in: 50..160 } + validates :description, length: { in: 10..160 } validate :deploy_local_presence validate :compatible_layouts, on: :update diff --git a/app/views/sites/_form.haml b/app/views/sites/_form.haml index d26eeeb..6f15d57 100644 --- a/app/views/sites/_form.haml +++ b/app/views/sites/_form.haml @@ -39,7 +39,7 @@ %h2= f.label :description %p.lead= t('.help.description') = f.text_area :description, class: form_control(site, :description), - maxlength: 160, minlength: 50, required: true + maxlength: 160, minlength: 10, required: true - if invalid? site, :description .invalid-feedback= site.errors.messages[:description].join(', ') %hr/