Sha256: 5ad9527640ccc5a5bc7ea1417c9fe72290c065d23d6b25eaac3d0ae09d794aa4
Contents?: true
Size: 289 Bytes
Versions: 1
Compression:
Stored size: 289 Bytes
Contents
class Product < ActiveRecord::Base belongs_to :category has_many :colors validates_presence_of :category validates_presence_of :name, :code validates_length_of :name, :in => 3..10 validates_length_of :code, :in => 3..10 accepts_nested_attributes_for :category, :colors end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
dejavu-0.2.0 | test_app/app/models/product.rb |