foodsoft/app/models/article_category.rb

18 lines
378 B
Ruby
Raw Normal View History

# == Schema Information
# Schema version: 20090119155930
#
# Table name: article_categories
#
# id :integer not null, primary key
# name :string(255) default(""), not null
# description :string(255)
#
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