project_ownership.rb 248 Bytes Edit Raw Blame History 1 2 3 4 5 6 7 8 9 #FIXME: remove this after the migration has been done and modify the migration accordingly class ProjectOwnership < ActiveRecord::Base belongs_to :user validates :project_id, presence: true def project Project.find(project_id) end end