Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate databases in controllers #2

Open
ghost opened this issue Apr 21, 2010 · 2 comments
Open

Separate databases in controllers #2

ghost opened this issue Apr 21, 2010 · 2 comments

Comments

@ghost
Copy link

ghost commented Apr 21, 2010

When i use a different database-connection, the plugin uses the new (my own) connection for finding pages etc... results in an error.

would be great if there is an easy fix for that.

@ghost
Copy link
Author

ghost commented Apr 22, 2010

My model:

class MyModel < ActiveRecord::Base
ActiveRecord::Base.establish_connection(YAML::load(ERB.new(IO.read("#{RAILS_ROOT}/config/mydbconf.yml")).result)["somenode_in_configfile"])

result:
Showing vendor/extensions/share_layouts/app/views/layouts/radiant.rhtml where line #1 raised:

Could not find table 'pages'

@saturnflyer
Copy link
Member

can you propose any code to help with this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant