I would like to use sequel with rails with just single (generic) defined
model:
So far I have this class defined inside models directory.
class Oracle
def self.db
c = Rails.application.config.database_configuration['oracle']
Sequel.connect(:adapter=>'oracle', :database=>c['database'],
:user=>c['username'], :password=>c['password'])
end
end
Which can be called like:
data = Oracle.db.from(:partner).where(id: someid).all
What bothers me is how to make this work without .db method beeing used.
Just the way it is used when model is defined.
data = Oracle.from(:partner).where(id: someid).all
by
TheR
--
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 http://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.