Skip to content

Instantly share code, notes, and snippets.

@mrb
Created October 10, 2008 19:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mrb/16141 to your computer and use it in GitHub Desktop.
Save mrb/16141 to your computer and use it in GitHub Desktop.
last_tr = TherapistReport.send(:with_exclusive_scope) {TherapistReport.all}.collect{|x| x if (x.report_id == self.report.previous && x.therapist_id == self.therapist_id && x.report.territory_id == self.report.territory_id)}.compact[0]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment