Rails :memory: revisited
As I was creating a new rails app, I used this previous post of mine to set up the in memory database. Well it’s time for an update. Apparently now the rails config/environments/*.rb are run in the context of Rails::Initializer. So instead of creating that context as in the previous post, you simply do:
<pre>
alias initialize_database_old initialize_database
def initialize_database *args
initialize_database_old
load "#{RAILS_ROOT}/db/schema.rb"
end</pre>
Post a comment
Website and email are optional. Email will be displayeduser at example dot com.