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

java - How to Configure JAXRS and Spring With Annotations -

visual studio - TFS will not accept changes I've made to a Java project -

php - Create image in codeigniter on the fly -