class Task < ActiveRecord::Base belongs_to :web has_many :task_logs, :order => 'start_time' has_one :description, :class_name => 'Page', :foreign_key => :description, :conditions => "usage = #{Page::TASK}" validates_uniqueness_of :title, :scope => :web_id end