Gab-Social/app/models/group_join_request.rb
mgabdev 217aab9faa Added join requests to Groups
• Added:
- join requests to Groups
- redux actions, reducers
- controller and functionality for fetching join requests, accepting, rejecting join requests
2020-09-10 17:07:00 -05:00

18 lines
431 B
Ruby

# == Schema Information
#
# Table name: group_join_requests
#
# id :bigint(8) not null, primary key
# account_id :bigint(8) not null
# group_id :bigint(8) not null
# created_at :datetime not null
# updated_at :datetime not null
#
class GroupJoinRequest < ApplicationRecord
belongs_to :group
belongs_to :account
validates :account_id, uniqueness: { scope: :group_id }
end