public
Created

  • Download Gist
gistfile1.rb
Ruby
1 2 3 4 5 6 7 8 9
class Order < ActiveRecord::Base
def each_day_in_period &block
current_date = start
while current_date < self.end
block.call current_date
current_date += 1.day
end
end
end

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.