feat: APIs for Articles (#4777)

Fixes: #4802
This commit is contained in:
Tejaswini Chile
2022-06-13 15:56:49 +05:30
committed by GitHub
parent 2198930185
commit ae72757d23
23 changed files with 511 additions and 42 deletions

View File

@@ -92,6 +92,7 @@ class User < ApplicationRecord
has_many :portals, through: :portals_members
has_many :team_members, dependent: :destroy_async
has_many :teams, through: :team_members
has_many :articles, foreign_key: 'author_id', dependent: :nullify
before_validation :set_password_and_uid, on: :create