Re: [Rails-core] Optional database connection in the initializer

2014-05-16 Thread Pier-Olivier Thibault
Yeah I know the solution, I wanted to know if you were interested making it into rails (I would have a provided the PR). All good then, I won't submit a patch. On Friday, May 16, 2014 5:25:39 PM UTC-4, Pascal Hurni wrote: > > Hi, > > Your use case is rather specific, I don't think we should add

Re: [Rails-core] Optional database connection in the initializer

2014-05-16 Thread Pascal Hurni
Hi, Your use case is rather specific, I don't think we should add such an option. BTW, you may override active_record's init in your application.rb file. I did a proof of concept, see this gist: https://gist.github.com/phurni/caac3efcbb43a38b8946 Cheers, Pascal Le 16.05.14 15:12, Pier-Ol

Re: [Rails-core] Optional database connection in the initializer

2014-05-16 Thread Pier-Olivier Thibault
I don't think it does, I'm talking about the initialization sequence and unless I'm mistaken, they are talking about database outage when the app is running. On Friday, May 16, 2014 9:34:33 AM UTC-4, Geoff Harcourt wrote: > > Hi Pier-Olivier, > > Somewhat related - you might want to take a look

Re: [Rails-core] Optional database connection in the initializer

2014-05-16 Thread Geoff Harcourt
Hi Pier-Olivier, Somewhat related - you might want to take a look at this approach that LevelUp uses to process payments when their system is too bogged down to process transactions in the database: http://www.confreaks.com/videos/2481-railsconf2013-zero-downtime-payment-platforms Not sure if

[Rails-core] Optional database connection in the initializer

2014-05-16 Thread Pier-Olivier Thibault
Hi! I'm working on a project that uses rails and I would like to have an onboarding process where rails works even if there's no database connection. I detect if ActiveRecord::Base is connected and if not, I show an html page to the user that explains how to connect it to the database. With ho