Fix VolunteerTeam to Volunteer association
This commit is contained in:
parent
9580128a5b
commit
655713cef0
|
@ -1,7 +1,6 @@
|
||||||
class VolunteerTeam < ActiveRecord::Base
|
class VolunteerTeam < ActiveRecord::Base
|
||||||
belongs_to :conference
|
belongs_to :conference
|
||||||
has_many :volunteerships
|
has_and_belongs_to_many :volunteers
|
||||||
has_many :volunteers, through: :volunteerships
|
|
||||||
|
|
||||||
validates :name, presence: true
|
validates :name, presence: true
|
||||||
validates :color, presence: true, format: {with: /\A#?[a-f0-9]{6}\z/i}
|
validates :color, presence: true, format: {with: /\A#?[a-f0-9]{6}\z/i}
|
||||||
|
|
Loading…
Reference in New Issue