Skip to content

Instantly share code, notes, and snippets.

@huttneab
Created December 19, 2014 18:41
Show Gist options
  • Save huttneab/1afdb969f52c3957f63d to your computer and use it in GitHub Desktop.
Save huttneab/1afdb969f52c3957f63d to your computer and use it in GitHub Desktop.
if rides.empty?
recently_completed_rides = user.rides.taxi_magicy.complete_or_canceled.not_rider_finished.pick_up_time_between(2.hours.ago, 24.hours.from_now)
rides.push(*recently_completed_rides)
end
rides = Ride
.where(user_id:user.id)
.where(booking_channel_id:[BookingChannel.id_iphone_taxi_magic, BookingChannel.id_android_taxi_magic])
.complete_or_canceled
.not_rider_finished
.pick_up_time_between(2.hours.ago, 24.hours.from_now) if rides.empty?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment