ErwinM / acts_as_tenant

Easy multi-tenancy for Rails in a shared database setup.
MIT License
1.53k stars 262 forks source link

No need to based on Rails MVC #310

Closed yetrun closed 7 months ago

yetrun commented 1 year ago

I am using the app based on Rack not on Rails(But also using active-record), and it will install all the Rails dependencies if I put it in the Gemfile. It should not based on the Rails if I am not using Rails, so how to configure it to discard the bloated dependencies or will add some fixes to adjust to more plain app structure?

excid3 commented 1 year ago

This gem is for Rails applications.

yetrun commented 1 year ago

It is not necessary to have a mandatory dependency on Rails. Actually, I have already successfully used it in my plain rack app. The only issue is that it will install a bunch of Rails related dependencies, Which makes my project bloated.

You can refer to the Pundit gem, which although based on Rails, doesn't mandate the installation of the Rails gem. In fact, it can be used independently as long as you avoid using Rails-specific features.