daily pastebin goal
43%
SHARE
TWEET

Untitled

a guest Mar 8th, 2018 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Parent.connection.select_values("SELECT id FROM parents").map {|parent_id| Child.connection.select_value("SELECT date FROM children WHERE parent_id = #{parent_id} ORDER BY date DESC LIMIT 1").to_date }.min
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