Added join requests to Groups

• Added:
- join requests to Groups
- redux actions, reducers
- controller and functionality for fetching join requests, accepting, rejecting join requests
This commit is contained in:
mgabdev
2020-09-10 17:07:00 -05:00
parent a8056f80a2
commit 217aab9faa
13 changed files with 456 additions and 6 deletions

View File

@@ -0,0 +1,17 @@
# == 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