Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- starttime = options[:starttime].blank? ? Time.now.midnight : options[:starttime]
- endtime = options[:endtime].blank? ? 1.day.from_now : options[:endtime]
- total_entries = DetectedChange.count(include: :device, starttime: starttime, endtime: endtime) if options[:total_entries].blank?
- return 0 if total_entries == 0
- rows = DetectedChange.paginate(:all,include: :device,starttime: starttime, endtime: endtime,page: start,
- per_page: limit, total_entries: total_entries)
Add Comment
Please, Sign In to add comment