Sha256: 547a62a8b7d1449b25d61437224012e7b54d8ace3acb27d3a986fdd2ff92ec0c
Contents?: true
Size: 688 Bytes
Versions: 11
Compression:
Stored size: 688 Bytes
Contents
module SocialNetworking # A question that is posed to participants when a profile is being created or # updated. class ProfileAnswer < ActiveRecord::Base belongs_to :profile, class_name: "SocialNetworking::Profile", foreign_key: :social_networking_profile_id belongs_to :profile_question, class_name: "SocialNetworking::ProfileQuestion", foreign_key: :social_networking_profile_question_id validates :profile, :profile_question, presence: true validates :social_networking_profile_question_id, uniqueness: { scope: :social_networking_profile_id, message: "has already been answered" } end end
Version data entries
11 entries across 11 versions & 1 rubygems