Sha256: 427ee916b5ce2386fe0a2b47b9d2cb118ff62fd9d9b512a0fef6390a8202ed4d

Contents?: true

Size: 691 Bytes

Versions: 3

Compression:

Stored size: 691 Bytes

Contents

class Post
  include Mongoid::Document
  include Mongoid::Timestamps
  include Mongoid::ByStar

  field :day_of_month,        type: Integer
end

class Appointment
  include Mongoid::Document
  include Mongoid::Timestamps
  include Mongoid::ByStar

  field :day_of_month,        type: Integer

  by_star_field index_scope: ->(start){ start - 5.days }
end

class Event
  include Mongoid::Document
  include Mongoid::Timestamps
  include Mongoid::ByStar

  field :st, as: :start_time, type: Time
  field :end_time,            type: Time
  field :day_of_month,        type: Integer

  by_star_field :start_time, :end_time, offset: 3.hours

  default_scope ->{ order_by(day_of_month: :asc) }
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
ta_by_star-4.1.0 spec/fixtures/mongoid/models.rb
ta_by_star-4.0.0 spec/fixtures/mongoid/models.rb
by_star-4.0.0 spec/fixtures/mongoid/models.rb