Sha256: a2c63e2b158a0d7bc4e6e45691bcc83f3eeeb1bc0483dcbc07ad2620d0746e7e

Contents?: true

Size: 686 Bytes

Versions: 1

Compression:

Stored size: 686 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 scope: ->{ where(day_of_month: 1) }
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-3.0.0 spec/fixtures/mongoid/models.rb