foodsoft/app/models/article_category.rb
benni 46450cebef New annotation, because of db switch to mysql.
Background: sqlite has some problems with decimal option.
2011-05-07 21:55:24 +02:00

17 lines
346 B
Ruby

class ArticleCategory < ActiveRecord::Base
has_many :articles
validates_length_of :name, :in => 2..20
validates_uniqueness_of :name
end
# == Schema Information
#
# Table name: article_categories
#
# id :integer(4) not null, primary key
# name :string(255) default(""), not null
# description :string(255)
#