Rails 6:Can be use before? and after? instead of compare operator.
TL,DR: With Rails 6, can be used two methods: before? and after? instead of two operator “ > “ and “<” when compares Date, DateTime, Time object.
Rails 6で、オペレーターの代わりに「Date」や「DateTime」や「Time」オブジェクトなどを比較すろために使用する新しいメソッド「before?」と「after?」を追加された。
»