Sha256: c87bbcf27bf0fe385a354ff1cb95e04d4b9a6dccf54522966653574b5350be58

Contents?: true

Size: 279 Bytes

Versions: 13

Compression:

Stored size: 279 Bytes

Contents

class MovieArticle < Article

  field :rating, type: Float
  field :classification, type: Integer

  validates :rating, numericality: { greater_than: 0, less_than_or_equal_to: 5 }
  validates :classification, numericality: { even: true, only_integer: true, allow_nil: false }
end

Version data entries

13 entries across 13 versions & 4 rubygems

Version Path
mongoid-spec-4.0.1 spec/models/movie_article.rb
mongoid-rspec-3.0.0 spec/models/movie_article.rb
mongoid-rspec-2.2.0 spec/models/movie_article.rb
mongoid-rspec-2.1.0 spec/models/movie_article.rb
mongoid-rspec-1.13.0 spec/models/movie_article.rb
mongoid-rspec-2.0.0 spec/models/movie_article.rb
mongoid-rspec-2.0.0.rc1 spec/models/movie_article.rb
glebtv-mongoid-rspec-3.0.0 spec/models/movie_article.rb
mongoid4-rspec-1.11.0 spec/models/movie_article.rb
glebtv-mongoid-rspec-1.12.0 spec/models/movie_article.rb
mongoid-rspec-1.11.0 spec/models/movie_article.rb
mongoid-rspec-1.10.0 spec/models/movie_article.rb
mongoid-rspec-1.9.0 spec/models/movie_article.rb