Account accepts_nested_attributes && acts_as_tenant(:account) for user
I keep going back and forth on this....
I'm building a product.(that hopefully) has many users from an account. The default that user would have acts_as_tenant(:account).
I'm building a product.(that hopefully) has many users from an account. The default that user would have acts_as_tenant(:account).
class User < ApplicationRecord acts_as_tenant(:account) ... end class Account < ApplicationRecord accepts_nested_attributes_for :users has_many :users end
For the first user of an account, I'd like them to signup also with the account name, and be considered the admin for that account. But I'm also thinking of a personal plan that would leverage the personal account. I've implemented account accepts_nested_attributes_for :users using Devise before in the past, and will implement that, but for the personal scenario, thoughts on how to do this?
@
Chris Oliver
A related question, when inviting someone, I'd like to invite them to my tenant. But when I added the above code, the tenant information isn't either 1) prepopulated in the Account Name or 2) that field is hidden. Any pointers, I've been digging through the code, and haven't quite figured that out.
Notifications
You’re not receiving notifications from this thread.