lib/camaraderie/membership.rb in camaraderie-0.1.3 vs lib/camaraderie/membership.rb in camaraderie-0.2

- old
+ new

@@ -1,11 +1,11 @@ module Camaraderie module Membership extend ActiveSupport::Concern included do # Associations - belongs_to :user, validate: true - belongs_to :organization + belongs_to :user, validate: true, class_name: Camaraderie.user_class, inverse_of: :memberships + belongs_to :organization, class_name: Camaraderie.organization_class, inverse_of: :memberships # Validations validates :user, presence: true validates :organization, presence: true validates :membership_type, presence: true, inclusion: { in: Camaraderie.membership_types }, uniqueness: { scope: [:user_id, :organization_id] }