标签: ruby-on-rails activerecord
请解决这个问题:
@d_repeats = Event.where(:repeat => 'daily', :shedule < date.end_of_month )
此处:shedule < date.end_of_month不正确。怎么样?
:shedule < date.end_of_month
答案 0 :(得分:10)
你可以做到
@d_repeats = Event.where(:repeat => 'daily').where("schedule < ?", date.end_of_month )