DB convention
#2179
Replies: 1 comment 6 replies
-
I've been pouring over the docs for a few hours, and there's a lot to take in (more so being new to the Ruby syntax as well) -- just now found a topic related to my question here, so this may become the answer: https://sequel.jeremyevans.net/rdoc/files/doc/code_order_rdoc.html#label-Load+Model+Classes |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
Newbie to Ruby, and this gem. I have a question about the DB convention found in the readme.
When declaring my models, it seems to be required that a DB connection exists already. How/when/where do you declare your models if you want the DB connection to not be a module constant, but rather something that you create in a method using some input arguments for the connection string?
Can I postpone the model declarations until after the connection has been made somehow? I wouldn't mind if the models end up nested within
DbStuff
, likeDbStuff::MyModule
or something like that.Beta Was this translation helpful? Give feedback.
All reactions