Created
February 10, 2012 07:05
-
-
Save rvanlieshout/1787324 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scope :between, lambda { |start_date, end_date| | |
joins(sanitize_sql_array(["INNER JOIN clocks clocks_between ON clocks_between.shift_id = shifts.id AND clocks_between.datetime BETWEEN (? AND ?)", start_date, end_date])) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment