Sha256: ad11548e1c352c6d8c707de27bc65a0e6dd6e32e142aa357119e69c01ff20f44

Contents?: true

Size: 316 Bytes

Versions: 1

Compression:

Stored size: 316 Bytes

Contents

class Project < ActiveRecord::Base

  include MappedAttributes

  has_many :tasks
  has_one :main_task, class_name: 'Task', order: 'priority ASC'
  accepts_nested_attributes_for :main_task

  validates_presence_of :subject
end

class Task < ActiveRecord::Base
  belongs_to :project

  validates_presence_of :name
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mapped_attributes-1.0.0 test/support/models.rb