:this
ユーザーがタイトルとまたはのいずれかを入力するように求められるフォームがあります:that
。ユーザーは両方のフィールドに入力できません。
<% f.input :title%>
<% f.input :this %>
<% f.input :that%>
私のために私:title
は私のモデルに持っています
validates :title, :presence => true
の検証に合格するにはどうすればよいですかeither :this or :that