Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Prepare the database after rails initialization

This allows specjour to play friendly with other gems that are required
to work with the database, specifically things like foreigner.
Unfortunately, foreigner doesn't work very well when the database
doesn't exist but that becomes a solvable problem with this patch.
  • Loading branch information...
commit 4640d74ecd077aae37418ae2baeff333cba4f066 1 parent 3a647e6
@sandro sandro authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 rails/init.rb
View
6 rails/init.rb
@@ -1,4 +1,6 @@
if ENV['PREPARE_DB']
- require 'specjour/db_scrub'
- Specjour::DbScrub.scrub
+ Rails.configuration.after_initialize do
+ require 'specjour/db_scrub'
+ Specjour::DbScrub.scrub
+ end
end
Please sign in to comment.
Something went wrong with that request. Please try again.