ArgumentError: You need to supply at least one validation with :if

前端 未结 0 498
南方客
南方客 2021-02-11 16:13

I have a simple model

class Task < ActiveRecord::Base
  validates :deadline, :if => :deadline_in_future?

  def deadline_in_future?
    Date.today < sel         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题