class ChannelMember < ActiveRecord::Base
  belongs_to :channel
  belongs_to :user
  validates :user_id, :channel_id, presence: true
end

class ChannelMember < ActiveRecord::Base
  belongs_to :channel
  belongs_to :user
  validates :user_id, :channel_id, presence: true
  validate :user_id, uniqueness: true
end

Add uniqueness validation to user on channel member
Add uniqueness validation to user on channel member
