Sha256: 45d87e4d2deb7ac0b63f6451b2c480c5ce031d303897e387160fa1e1455dc82b

Contents?: true

Size: 299 Bytes

Versions: 3

Compression:

Stored size: 299 Bytes

Contents

class MovieArticle < Article
  field :rating, :type => Numeric
  field :classification, :type => Integer
  
  validates_numericality_of :rating, :greater_than => 0, :less_than_or_equal_to => 5
  validates_numericality_of :classification, :even => true, :only_integer => true, :allow_nil => false
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
mongoid-rspec-1.4.4 spec/models/movie_article.rb
mongoid-rspec-1.4.3 spec/models/movie_article.rb
mongoid-rspec-1.4.2 spec/models/movie_article.rb