Sha256: 0a3ea418a1a9e47e3fd42ba3fca4581df169fc0057ab43658f327c099bc90279
Contents?: true
Size: 718 Bytes
Versions: 5
Compression:
Stored size: 718 Bytes
Contents
# frozen_string_literal: true 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
5 entries across 5 versions & 1 rubygems