Fix supported rails4
- replace query in events_for_date_range