class Project < ActiveRecord::Base
belongs_to :portfolio
has_one :project_manager
has_many :milestones
has_many :deliverables, through: milestones
validates :name, :description, presence: true
validates :non_disclosure_agreement, acceptance: true
validates :short_name, uniqueness: true
end
Created
January 22, 2016 02:19
-
-
Save mayra-cabrera/adbb773c4ffad3bfc4f4 to your computer and use it in GitHub Desktop.
ruby_model_example
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment