Guest User

Untitled

a guest
Apr 25th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. def max(column, date)
  2. month = Date.parse(date)
  3. sizes = []
  4. for(month..(month + 1.month)) do |day|
  5. sizes << Backup.sum(column, :conditions => {:backup_start => Date.parse(date)..(Date.parse(date) + 1)})
  6. end
  7. return sizes.max
  8. end
Add Comment
Please, Sign In to add comment