removes max restriction on title length

This commit is contained in:
Juanjo Bazán
2017-02-12 13:08:26 +01:00
parent dee1b64eb6
commit db9ee74828

View File

@@ -16,7 +16,7 @@ class Poll::Question < ActiveRecord::Base
validates :title, presence: true
validates :author, presence: true
validates :title, length: { in: 4..Poll::Question.title_max_length }
validates :title, length: { minimum: 4 }
validates :description, length: { maximum: Poll::Question.description_max_length }
scope :by_poll_id, ->(poll_id) { where(poll_id: poll_id) }