app/models/contract.rb
# returns the enrollment record for a user, or nil if the user
# is not actively enrolled
returns the enrollment record for a user, or nil if the user
is not actively enrolled
returns the enrollment record for a user or nil if the user is not actively enrolled
def participant_enrollment(user)
		enrollments.find(:first, 
			:conditions => ["enrollment_status >= ? and participant_id = ?", 
												Enrollment::STATUS_ENROLLED, user.id])
	end
def participant_enrollment ( user ) enrollments . find ( :first , :conditions => [ "enrollment_status >= ? and participant_id = ?" , Enrollment :: STATUS_ENROLLED , user . id ] ) end
returns the enrollment record for a user, or nil if the user
is not actively enrolled
returns the enrollment record for a user or nil if the user is not actively enrolled
user
<not_specific>