jekuno / milia

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

Generator creating references which should be deleted? #86

Open rmindigo opened 6 years ago

rmindigo commented 6 years ago

README suggests the following:

"Clean up tenant references Clean up any generated belongs_to tenant references in all models which the generator might have generated (both acts_as_tenant and acts_as_universal)."

In my member.rb Model, generator created belongs_to :user and acts_as_tenant.

Question: Do I need to delete both these (belongs_to :user and acts_as_tenant) from my member.rb model? Want to be 100% sure to avoid big issues down the road! Also, if need to be deleted, why did Generator create them in the first place? Thanks!

yshmarov commented 5 years ago

Member.rb must have both lines:

 acts_as_tenant
  belongs_to :user

the readme means that in every tenant-specific model, instead of having belongs_to :tenant you must have the line acts_as_tenant