feat: Ability for the logged in user to create a new account (#985)

Co-authored-by: Divyesh <dkothari@box8.in>
Co-authored-by: Pranav Raj S <pranav@thoughtwoot.com>
This commit is contained in:
Divyesh Kothari
2020-07-26 12:54:50 +05:30
committed by GitHub
parent 858b72a404
commit 89ed0b425b
13 changed files with 219 additions and 28 deletions

View File

@@ -59,6 +59,7 @@ class User < ApplicationRecord
# The validation below has been commented out as it does not
# work because :validatable in devise overrides this.
# validates_uniqueness_of :email, scope: :account_id
validates :email, :name, presence: true
has_many :account_users, dependent: :destroy