Skip to content

Instantly share code, notes, and snippets.

@StasKoval
Created July 16, 2015 13:58
Show Gist options
  • Save StasKoval/ca09ddafe47e2cddb82f to your computer and use it in GitHub Desktop.
Save StasKoval/ca09ddafe47e2cddb82f to your computer and use it in GitHub Desktop.
InterviewResponse.last.email_stats
InterviewResponse Load (0.5ms) SELECT `interview_responses`.* FROM `interview_responses` ORDER BY `interview_responses`.`id` DESC LIMIT 1
EmailStat Load (0.4ms) SELECT `email_stats`.* FROM `email_stats` WHERE `email_stats`.`stat_id` = 4 AND `email_stats`.`stat_type` = 'InterviewResponse'
=> #<ActiveRecord::Associations::CollectionProxy [#<EmailStat id: 3, user_id: 5, message_id: "<[email protected]>", status: "delivered", stat_id: 4, stat_type: "InterviewResponse", created_at: "2015-07-16 13:56:11", updated_at: "2015-07-16 13:56:14">]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment