Sha256: 7c98be6e21a05973e3250e341ecb326408ceb1410eae4916546043d5c19fba2a

Contents?: true

Size: 232 Bytes

Versions: 2

Compression:

Stored size: 232 Bytes

Contents

module Bongo
  class Article
    include Mongoid::Document

    field :title, type: String
    field :text, type: String
    field :publish_at, type: Date

    scope :published, -> { where(:publish_at.lte => Date.today) }
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bongo-0.1.1 app/models/bongo/article.rb
bongo-0.1.0 app/models/bongo/article.rb