Closed conal4284 closed 5 years ago
I've had success excluding models, but am on Rails 5.2 and Ruby 2.5.
config.excluded_models = ["Delayed::Backend::ActiveRecord::Job"]
I want to include model for every tenant. In other words I want tenant specific users. The users of tenant A cannot login into tenant B.
Ah, that should work by default if you remove the entire line
config.excluded_models = %w{ User }
excluded_models
defaults to an empty array, so nothing should be excluded.
yeah, if you don't want to the exclude the model don't include it in the excluded_models
. need some more details about what doesn't work if you're still struggling.
Steps to reproduce
In apartment.rb config.excluded_models = %w{ User } is used to make Users global. i.e. Users will work for any tenant. I am trying to make users independent by removing it from above given statement in apartment.rb. It is not working. How this can be achieved?
System configuration
Database: Mysql 5.7
Apartment version: 1.2.0
Apartment config (in
config/initializers/apartment.rb
or so):use_schemas
: (true
orfalse
)Rails (or ActiveRecord) version: 4.2
Ruby version: 1.9