SHARE
TWEET

Untitled

a guest Sep 2nd, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. scope :filter_on_start_date, ->(date_start = nil, date_end = nil) {
  2.     return if date_start.nil? && date_end.nil?
  3.     where('start_at >= ?', date_start) if date_start.present?
  4.     where('start_at <= ?', date_end) if date_end.present?
  5.   }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top