diff --git a/app/models/user.rb b/app/models/user.rb index 4798a809..70e589b3 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -21,7 +21,7 @@ class User < ActiveRecord::Base has_many :events, -> { uniq }, through: :event_users has_many :registrations, dependent: :destroy has_many :votes, dependent: :destroy - has_many :voted_events, through: :votes, source: :events + has_many :voted_events, through: :votes, source: :event accepts_nested_attributes_for :roles