Fix initializer usage to run as soon as possible #15

wants to merge 1 commit into from

2 participants


Following up from my comment here: b9f2810

Would be interested to hear if you had any thoughts on a different place to put it in the long chain of slots you can slip it into, but this seems to work fine and my understanding of the problem this gem strives to solve is that sooner is better.

Apologies if I missed something, but I couldn't find anything on the before_configuration method you were trying to use, maybe it might work as config.before_configuration? I think using initializer is more standard though.

John Wilkinson Fix initializer usage to run as soon as possible
before_configuration was throwing NoMethodError

See and

The problem is that it needs to run even before step 3, which I think unfortunately means that on require is our best option.


Ok fair enough, it feels strange to have something do it's final purpose right when you require it, but I think it just comes down to practicality... I guess if someone actually had a reason why they would not want it to run that early they could just do require: false in their Gemfile and require it later. I'll go ahead and close the PR, thanks for the explanation though.

@jcwilk jcwilk closed this Dec 28, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment