Hi Everyone, we are using Sequel in our Rails app with PostgreSQL adapter. 
We have initialized it in this way 


in initializer..


require 'evercam_misc'

DB = Sequel::Model.db = Sequel.connect(ENV['DATABASE_URL'], 
max_connections: 100)
Sequel::Model.db.sql_log_level = Rails.application.config.log_level || 
:debug

if ARGV.any? {|parameter| parameter =~ /(--sandbox|-s)/}
   # Do everything inside a transaction when using rails c --sandbox (or 
-s).
   DB.pool.after_connect = proc do |connection|
      DB.send(:add_transaction, connection, {})
      DB.send(:begin_transaction, connection, {})
   end
end

# Connection created, pull in the model classes.
require 'evercam_models'

the reason of posting here is.. There is one model as 

require 'active_support/core_ext/object/blank'
class CameraActivity < Sequel::Model
end

I want to connect that single model to another DB which is 
ENV['SNAPSHOT_DATABASE_URL']..

is that possible to make a single model to behave like that? 


-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to