project_attributes.rb 197 Bytes Edit Raw Blame History 1 2 3 4 5 6 7 8 9 class ProjectAttributes < ActiveRecord::Base belongs_to :user validates :project_id, presence: true validates :user, presence: true def project Project.find(self.project_id) end end