foodsoft/app/models/article_category.rb

8 lines
145 B
Ruby
Raw Normal View History

2009-01-06 11:49:19 +01:00
class ArticleCategory < ActiveRecord::Base
has_many :articles
validates_length_of :name, :in => 2..20
validates_uniqueness_of :name
end