dsp_099
dsp_099

Reputation: 6121

Where to place an Include for it to be available for the entire Rails app?

I want to use the term-ansicolor gem to help me out developing and debugging.

Simply requiring it in the Gemfile isn't enough as somewhere in the app, include Term::ANSIColor must show up.

I created a config/initializers/colors.rb and it worked as intended, but an initializer doesn't seem like the right place for it.

Where is the ideal place for this include statement?

I'm running rails version 4.2, if it makes any difference.

Upvotes: 0

Views: 39

Answers (1)

Taryn East
Taryn East

Reputation: 27747

high level includes could go in application.rb but an intitializer is a good enough place to put stuff like this.

Upvotes: 1

Related Questions