【发布时间】:2017-05-04 10:24:42
【问题描述】:
在 Rails 5 中,我正在使用 apartment gem 开发多租户功能。我必须向所有租户显示通用下拉数据,但它不起作用。
例如:我有cities 列表。创建了两个租户,两者都应该获得相同的cities 列表。但即使有数据,列表也不会显示。
添加的宝石是,
apartment (1.2.0)
在database.yml中,
default: &default
adapter: postgresql
pool: 5
encoding: UTF-8
database: TestApp
username: sample
password: pwd123
development:
<<: *default
host: localhost
如何显示所有租户的共同城市列表?
【问题讨论】:
标签: ruby-on-rails ruby postgresql multi-tenant