From 655713cef0b0ce5fa230ad6264239865c754a340 Mon Sep 17 00:00:00 2001 From: Petko Bordjukov Date: Sun, 9 Oct 2016 15:13:06 +0300 Subject: [PATCH] Fix VolunteerTeam to Volunteer association --- app/models/volunteer_team.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/models/volunteer_team.rb b/app/models/volunteer_team.rb index 46f3dad..5c5c2f7 100644 --- a/app/models/volunteer_team.rb +++ b/app/models/volunteer_team.rb @@ -1,7 +1,6 @@ class VolunteerTeam < ActiveRecord::Base belongs_to :conference - has_many :volunteerships - has_many :volunteers, through: :volunteerships + has_and_belongs_to_many :volunteers validates :name, presence: true validates :color, presence: true, format: {with: /\A#?[a-f0-9]{6}\z/i}