Created
April 29, 2012 19:58
-
-
Save Veejay/2552959 to your computer and use it in GitHub Desktop.
This file contains 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
def work_weeks_for_date_range(date_range) | |
{}.tap do |result| | |
date_range.each do |date| | |
result.store(date, WorkWeek.where(user_id: id, cweek: date.cweek, year: date.year, project_id: projects.for_company(current_company_id).map(&:id))) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment