- Swtaarrs
- Posts: 10
- Starts: 9
- Wiki Edits: 1
- Location: Pittsburgh, PA
I just created my Hostingrails account and I'm about to set up my main rails app, but there's a problem I have to resolve first. I'm using ActiveRecord::Base.table_name_suffix to change the working set of data for my application on the fly (I have code in a before filter in ApplicationController that handles it). The problem is that in production mode, I can only assign a value to that variable once, then further assignments don't work, so it's stuck using whatever set of data gets chosen first (until I restart the server). It works fine in development mode, so on my old host I had it running in development mode. However, for both speed concerns and the fact that Railshosting prohibits apps from running in development mode, I need to get this working in production mode. Is there any way I can do multiple assignments to ActiveRecord::Base.table_name_suffix in production mode without having to restart the app on each request? (which obviously isn't an acceptable solution) If there's some other way to set the table name suffix globally I could use that too, but either way it has to work in production mode.
Thanks,
Brett
2007-03-21 04:46 PM