[Rails] Re: Can ActiveRecord::Base.connection.schema_search_path be set per process?

2014-05-22 Thread Reginaldo Junior
One more thing guys, could someone please tell me if the ORM will need to re-load its schema( table metadata) on each request if I set the Postgres search path? Em domingo, 18 de maio de 2014 23h18min30s UTC-3, Reginaldo Junior escreveu: I am building an app that every company has it own

[Rails] Re: Can ActiveRecord::Base.connection.schema_search_path be set per process?

2014-05-20 Thread Reginaldo Junior
I mean, is there a better solution that fits better Unicorn design? Em segunda-feira, 19 de maio de 2014 03h48min14s UTC-3, Frederick Cheung escreveu: Is this solution going to fail even if Unicorn is one thread per worker(EA37168483process)? If this is not the right way, what else can I

[Rails] Re: Can ActiveRecord::Base.connection.schema_search_path be set per process?

2014-05-19 Thread Frederick Cheung
On Monday, May 19, 2014 2:18:30 PM UTC+12, Reginaldo Junior wrote: I am building an app that every company has it own private schema(Postgresql). For every requisition, I set the Postgres search path in a before_action like this:ActiveRecord::Base.connection.schema_search_path = 'company_id,