fix error
This commit is contained in:
parent
ada0c0642d
commit
c4246c84be
|
@ -27,7 +27,7 @@ class AdImage
|
|||
|
||||
before_validation :add_http
|
||||
# validates :file, presence: true
|
||||
validates :out_link, format: { with: URI::regexp(%w(http https)) }, allow_blank: true
|
||||
validates :out_link, format: { with: URI::regexp(%w(http https \/)) }, allow_blank: true
|
||||
# validates :title, presence: true
|
||||
|
||||
scope :can_display, ->{self.and(AdImage.or({:postdate.lte=>Time.now},{:postdate=>nil}).selector,AdImage.or({:deadline.gte=>Time.now},{:deadline=>nil}).selector)}
|
||||
|
|
Loading…
Reference in New Issue