Sha256: 7b26551d811e42f4905c5828ca4a15324dfd74ad4d18c08a3813f71286d69b75

Contents?: true

Size: 597 Bytes

Versions: 2

Compression:

Stored size: 597 Bytes

Contents

module Feed
  class Item
    include Mongoid::Document

    field :name, type: String
    field :a_integer, type: Integer
    field :a_string, type: String
    field :a_datetime, type: DateTime
    field :a_date, type: Date
    field :a_time, type: Time
    field :a_array, type: Array

    embeds_many :embedded_items, class_name: 'Feed::EmbeddedItem'

    publisher_options = { class_name: 'Feed::Publisher' }
    publisher_options[:optional] = true if Mongoid::Compatibility::Version.mongoid6? || Mongoid::Compatibility::Version.mongoid7?
    belongs_to :publisher, publisher_options
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mongoid-scroll-0.3.7 spec/support/feed/item.rb
mongoid-scroll-0.3.6 spec/support/feed/item.rb