Sha256: 6f7201c0181d74aa087955582a5e10b5dad146292617168bee5d36ef70b3ca08
Contents?: true
Size: 315 Bytes
Versions: 19
Compression:
Stored size: 315 Bytes
Contents
class Account include Mongoid::Document field :period, :type => TimeSpan, :between => true def self.create_it! duration s = self.new s.period = {duration: duration} s end def self.between from, to Account.where(:'period.from'.gt => from.to_i, :'period.to'.lte => to.to_i) end end
Version data entries
19 entries across 19 versions & 1 rubygems