foodsoft/app/models/article_category.rb

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