radiant / radiant-share-layouts-extension

An extension for Radiant CMS that allows controllers to render their views within Radiant layouts.
Other
22 stars 15 forks source link

Separate databases in controllers #2

Open ghost opened 14 years ago

ghost commented 14 years ago

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 commented 14 years ago

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 commented 12 years ago

can you propose any code to help with this?