[CodeFactor] Apply fixes to commit a651f07

This commit is contained in:
codefactor-io
2019-11-11 04:42:30 +00:00
parent a651f079d8
commit e0ea039347

View File

@@ -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 = {