foodsoft/app/models/article_category.rb

8 lines
158 B
Ruby
Raw Normal View History

class ArticleCategory < ActiveRecord::Base
has_many :articles
2011-05-18 16:10:30 +02:00
validates :name, :presence => true, :uniqueness => true, :length => { :in => 2..20 }
end