jekuno / milia

Easy multi-tenanting for Rails5 (or Rails4) + Devise
MIT License
341 stars 72 forks source link

Milia::Control::InvalidTenantAccess in MembersController#create no existing valid current tenant #75

Open adamw005 opened 7 years ago

adamw005 commented 7 years ago

I am getting this error after I have created an initial user and try to invite a new member.

Milia::Control::InvalidTenantAccess in MembersController#create
no existing valid current tenant`

The highlighted line is

if @user.save_and_invite_member() && @user.create_member( member_params )

I checked the console, there are no Member records but there is a User record and Tenant record

adamw005 commented 7 years ago

Sign Out also seems to not be working I'm using the rails4-support branch w/ Rails 4.2.6

jekuno commented 7 years ago

@adamw005 Thanks for your feedback. Did you make sure that you have a current_tenant (i.e. you performed a sign in first) when you are trying to add a new member?