daily pastebin goal
52%
SHARE
TWEET

Untitled

a guest Sep 25th, 2018 57 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1.   def self.search(params)
  2.     orders = self
  3.     orders = orders.scoped(:conditions => {:service_type => params[:service_type]}) if params[:service_type].present?
  4.     orders = orders.scoped(:conditions => ['orders.created_at >= ?', params[:date_range_start]]) if params[:date_range_start].present?
  5.     orders = orders.scoped(:conditions => ['orders.created_at <= ?', params[:date_range_end]]) if params[:date_range_end].present?
  6.     orders.all
  7.   end
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