Sha256: a54b535535b597579e4adfd34f68e835cd3384c5ae6363ca89e72a411386d603

Contents?: true

Size: 543 Bytes

Versions: 17

Compression:

Stored size: 543 Bytes

Contents

class Post
  include Mongoid::Document
  include Lolita::Configuration
  field :title, type: String
  field :body, type: String
  field :is_public, type: Boolean
  field :price, type: BigDecimal
  field :published_at, type: DateTime, default: -> { Time.now }
  field :expire_date, type: Date
  belongs_to :category
  has_and_belongs_to_many :tags
  has_many :comments
  belongs_to :profile
  validates_presence_of :title
  default_scope order_by([:title, :asc])
  accepts_nested_attributes_for :comments, :reject_if => :all_blank

  lolita
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
lolita-3.2.0.rc.5 spec/rails_app/app/mongoid/post.rb
lolita-3.2.0.rc.4 spec/rails_app/app/mongoid/post.rb
lolita-3.2.0.rc.3 spec/rails_app/app/mongoid/post.rb
lolita-3.2.0.rc2 spec/rails_app/app/mongoid/post.rb
lolita-3.2.0.rc1 spec/rails_app/app/mongoid/post.rb
lolita-3.1.17 spec/rails_app/app/mongoid/post.rb
lolita-3.1.16 spec/rails_app/app/mongoid/post.rb
lolita-3.1.15 spec/rails_app/app/mongoid/post.rb
lolita-3.1.14 spec/rails_app/app/mongoid/post.rb
lolita-3.1.13 spec/rails_app/app/mongoid/post.rb
lolita-3.1.12 spec/rails_app/app/mongoid/post.rb
lolita-3.1.11 spec/rails_app/app/mongoid/post.rb
lolita-3.1.9 spec/rails_app/app/mongoid/post.rb
lolita-3.1.8 spec/rails_app/app/mongoid/post.rb
lolita-3.1.7 spec/rails_app/app/mongoid/post.rb
lolita-3.1.6 spec/rails_app/app/mongoid/post.rb
lolita-3.1.5 spec/rails_app/app/mongoid/post.rb