Pier-Olivier Thibault
2014-May-16 13:12 UTC
Optional database connection in the initializer
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 how the initializers works, I believe it's not possible to include ActiveRecord and not have it connected to a database so I created a fork and wanted to discuss about it here. Here's the patch in my fork as it is right now: https://github.com/pothibo/rails/commit/f359fd6288bc3a05f41266eeecbce04e21d8a5a2 Here's a few things that might be worth discussing: - Is it something that can make it to master? - configuration name: can I name it better? Have a good day, Pier-Olivier Thibault -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-core+unsubscribe@googlegroups.com. To post to this group, send email to rubyonrails-core@googlegroups.com. Visit this group at http://groups.google.com/group/rubyonrails-core. For more options, visit https://groups.google.com/d/optout.