How can rails gems Apartment and Datagrid work together nicely? -


apartment being implemented large project uses datagrid. apartment configured switch postgresql schemas (tenants) on per subdomain basis. problem filters, should reference tenant specific schema, pull data out of public schema.

is there way datagrid filters @ correct schema in postgresql?

i opened issue on datagrid github account , got answer bogdan:

"seems, need wrap select proc this:

:select => proc {  user.order(:last_name).all.map{ |u| [u.full_name, u.id] } 

in way datagrid query select options every time filter rendered. :select without proc can used when options constant."

https://github.com/bogdan/datagrid/issues/70#issuecomment-23002811

hard why worked locally without proc, answer.


Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -