Sha256: ab2d848713520b8f67fa9cfdae1218662d931c56bdf80e08705a8758a6dc71ef

Contents?: true

Size: 722 Bytes

Versions: 1

Compression:

Stored size: 722 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

1 entries across 1 versions & 1 rubygems

Version Path
by_star-4.0.1 spec/fixtures/mongoid/models.rb