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

前端 未结 0 1541
夕颜
夕颜 2021-02-11 16:32

I have a simple model

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

  def deadline_in_future?
    Date.today < sel         


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