From e0ea039347ebb3f2ee811f296409786b4098111e Mon Sep 17 00:00:00 2001 From: codefactor-io Date: Mon, 11 Nov 2019 04:42:30 +0000 Subject: [PATCH] [CodeFactor] Apply fixes to commit a651f07 --- app/models/garden.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/garden.rb b/app/models/garden.rb index 1ab894986..d216eef55 100644 --- a/app/models/garden.rb +++ b/app/models/garden.rb @@ -27,11 +27,11 @@ class Garden < ApplicationRecord validates :name, uniqueness: { scope: :owner_id } validates :name, format: { without: /\n/, message: "must contain no newlines" }, - allow_nil: false, allow_blank: false, presence: true, + allow_blank: false, presence: true, length: { maximum: 255 } validates :area, - numericality: {only_integer: false, greater_than_or_equal_to: 0 }, + numericality: { only_integer: false, greater_than_or_equal_to: 0 }, allow_nil: true AREA_UNITS_VALUES = {