From 14a1eeb44f9cdf5d2cc5a45fb865a97548b09d05 Mon Sep 17 00:00:00 2001 From: kreopelle Date: Wed, 10 Oct 2018 21:02:55 -0400 Subject: [PATCH] Change spelling for constant to TITLE_LENGTH_RANGE, instead of TITLE_LEGHT_RANGE --- app/models/image.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/image.rb b/app/models/image.rb index 25cf449bd..8f62f94d8 100644 --- a/app/models/image.rb +++ b/app/models/image.rb @@ -2,7 +2,7 @@ class Image < ActiveRecord::Base include ImagesHelper include ImageablesHelper - TITLE_LEGHT_RANGE = 4..80 + TITLE_LENGTH_RANGE = 4..80 MIN_SIZE = 475 MAX_IMAGE_SIZE = 1.megabyte ACCEPTED_CONTENT_TYPE = %w(image/jpeg image/jpg).freeze @@ -23,7 +23,7 @@ class Image < ActiveRecord::Base validate :attachment_presence validate :validate_attachment_content_type, if: -> { attachment.present? } validate :validate_attachment_size, if: -> { attachment.present? } - validates :title, presence: true, length: { in: TITLE_LEGHT_RANGE } + validates :title, presence: true, length: { in: TITLE_LENGTH_RANGE } validates :user_id, presence: true validates :imageable_id, presence: true, if: -> { persisted? } validates :imageable_type, presence: true, if: -> { persisted? }