Skip to content

Instantly share code, notes, and snippets.

@oren
Created October 1, 2010 01:49
Show Gist options
  • Select an option

  • Save oren/605605 to your computer and use it in GitHub Desktop.

Select an option

Save oren/605605 to your computer and use it in GitHub Desktop.
app/model/event.rb
class MediaDatabase::Event < External
establish_connection :media_development
end
external.rb - not sure where it should be
class External < ActiveRecord::Base
self.abstract_class = true
establish_connection :media_development
end
application controller (before_filter)
def populate_events
result = MediaDatabase::Event.find(:all)
end
error:
uninitialized constant ApplicationController::MediaDatabase
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment