Make papers.published_at optional

This commit is contained in:
Andreas Haller 2015-07-08 20:04:50 +02:00
parent 94f57a0f07
commit 8afc7c9c93

View file

@ -5,7 +5,8 @@ class Paper < ActiveRecord::Base
include Elasticsearch::Model
include Elasticsearch::Model::Callbacks
validates_presence_of :body, :content, :name, :originator, :paper_type, :published_at, :reference, :url
validates_presence_of :body, :content, :name, :originator, :paper_type, :reference, :url
validates_presence_of :published_at, allow_nil: true
validates :url, uniqueness: true
class << self