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

Version Path
social_networking-0.11.8 app/models/social_networking/profile_answer.rb
social_networking-0.11.7 app/models/social_networking/profile_answer.rb
social_networking-0.11.6 app/models/social_networking/profile_answer.rb
social_networking-0.11.5 app/models/social_networking/profile_answer.rb
social_networking-0.11.4 app/models/social_networking/profile_answer.rb
social_networking-0.11.3 app/models/social_networking/profile_answer.rb
social_networking-0.11.2 app/models/social_networking/profile_answer.rb
social_networking-0.11.1 app/models/social_networking/profile_answer.rb
social_networking-0.11.0 app/models/social_networking/profile_answer.rb
social_networking-0.10.0 app/models/social_networking/profile_answer.rb
social_networking-0.9.3 app/models/social_networking/profile_answer.rb