rosa-build/app/models/category.rb

11 lines
208 B
Ruby

# -*- encoding : utf-8 -*-
class Category < ActiveRecord::Base
has_many :projects, :dependent => :nullify
validates :name, :presence => true
default_scope order('categories.name')
has_ancestry
end