Jason, Best place is in an initializer.
Don On Jan 12, 2011, at 10:51 AM, Jason Thomas wrote: > Where is the recommended place to initialize the Sequel database > connection in a Rails app? Initially I was doing it in the model but > once you have more than one model that doesn't make sense. Basically > where do I put this line: > > DB = Sequel.connect(YAML.load(File.read(File.join(::Rails.root,'config/ > database.yml')))[::Rails.env]) > > -- > You received this message because you are subscribed to the Google Groups > "sequel-talk" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/sequel-talk?hl=en. > -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sequel-talk?hl=en.
