# == Schema Information # # Table name: tasks # # id :integer not null, primary key # organization_id :integer # user_id :integer # task_name :string(255) # duty_time :time # accept :boolean default(FALSE) # done :boolean default(FALSE) # duty_date :date # created_at :datetime # updated_at :datetime # class Task < ActiveRecord::Base belongs_to :organization belongs_to :user # validates_time :duty_time validates_date :duty_date validates_presence_of :task_name end